feat: always show zaps

This commit is contained in:
2023-02-28 19:47:04 +00:00
parent ac41f8c2f4
commit a39d015917
2 changed files with 6 additions and 4 deletions

View File

@ -32,8 +32,8 @@ export default function useThreadFeed(id: u256) {
const subRelated = new Subscriptions(); const subRelated = new Subscriptions();
subRelated.Kinds = new Set( subRelated.Kinds = new Set(
pref.enableReactions pref.enableReactions
? [EventKind.Reaction, EventKind.TextNote, EventKind.Deletion, EventKind.Repost, EventKind.ZapReceipt] ? [EventKind.Reaction, EventKind.TextNote, EventKind.Repost, EventKind.ZapReceipt]
: [EventKind.TextNote] : [EventKind.TextNote, EventKind.ZapReceipt]
); );
subRelated.ETags = thisSub.Ids; subRelated.ETags = thisSub.Ids;
thisSub.AddSubscription(subRelated); thisSub.AddSubscription(subRelated);

View File

@ -115,10 +115,12 @@ export default function useTimelineFeed(subject: TimelineSubject, options: Timel
const subNext = useMemo(() => { const subNext = useMemo(() => {
let sub: Subscriptions | undefined; let sub: Subscriptions | undefined;
if (trackingEvents.length > 0 && pref.enableReactions) { if (trackingEvents.length > 0) {
sub = new Subscriptions(); sub = new Subscriptions();
sub.Id = `timeline-related:${subject.type}`; sub.Id = `timeline-related:${subject.type}`;
sub.Kinds = new Set([EventKind.Reaction, EventKind.Repost, EventKind.Deletion, EventKind.ZapReceipt]); sub.Kinds = new Set(
pref.enableReactions ? [EventKind.Reaction, EventKind.Repost, EventKind.ZapReceipt] : [EventKind.ZapReceipt]
);
sub.ETags = new Set(trackingEvents); sub.ETags = new Set(trackingEvents);
} }
return sub ?? null; return sub ?? null;