bug: use limit 1 for latest sub

This commit is contained in:
Kieran 2023-01-21 22:46:57 +00:00
parent 121d98e9fa
commit 7680b16ab5
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
2 changed files with 3 additions and 3 deletions

View File

@ -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"/>
&nbsp;
Show latest {latestFeed.length} notes

View File

@ -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]);