forked from Kieran/snort
bug: use limit 1 for latest sub
This commit is contained in:
parent
121d98e9fa
commit
7680b16ab5
@ -49,7 +49,7 @@ export default function Timeline({ subject, postsOnly = false, method }: Timelin
|
||||
|
||||
return (
|
||||
<>
|
||||
{latestFeed.length > 0 && (<div className="card latest-notes pointer" onClick={() => showLatest()}>
|
||||
{latestFeed.length > 1 && (<div className="card latest-notes pointer" onClick={() => showLatest()}>
|
||||
<FontAwesomeIcon icon={faForward} size="xl"/>
|
||||
|
||||
Show latest {latestFeed.length} notes
|
||||
|
@ -66,7 +66,7 @@ export default function useTimelineFeed(subject: TimelineSubject, options: Timel
|
||||
let latestSub = new Subscriptions();
|
||||
latestSub.Ids = sub.Ids;
|
||||
latestSub.Kinds = sub.Kinds;
|
||||
latestSub.Limit = 0;
|
||||
latestSub.Limit = 1;
|
||||
sub.AddSubscription(latestSub);
|
||||
}
|
||||
}
|
||||
@ -79,7 +79,7 @@ export default function useTimelineFeed(subject: TimelineSubject, options: Timel
|
||||
let subLatest = createSub();
|
||||
if (subLatest && !pref.autoShowLatest) {
|
||||
subLatest.Id = `${subLatest.Id}:latest`;
|
||||
subLatest.Limit = 0;
|
||||
subLatest.Limit = 1;
|
||||
}
|
||||
return subLatest;
|
||||
}, [subject.type, subject.items]);
|
||||
|
Loading…
Reference in New Issue
Block a user