feat: partial favourites

This commit is contained in:
mae taylor 2025-07-15 15:37:03 +01:00
parent c51a0b1e5d
commit 99def58c8b
Signed by: mae
GPG key ID: 3C80D76BA7A3B9BD
3 changed files with 81 additions and 8 deletions

View file

@ -19,14 +19,27 @@ export async function getTimeline(timelineType = "home", clean, localOnly = fals
if (!clean && get(timeline).length > 0)
last_post = get(timeline)[get(timeline).length - 1].id;
const timeline_data = await api.getTimeline(
get(server).host,
get(app).token,
timelineType,
last_post,
localOnly,
remoteOnly
);
let timeline_data;
switch(timelineType) {
case "favourites":
timeline_data = await api.getFavourites(
get(server).host,
get(app).token,
last_post,
)
break;
default:
timeline_data = await api.getTimeline(
get(server).host,
get(app).token,
timelineType,
last_post,
localOnly,
remoteOnly
);
break;
}
if (!timeline_data) {
console.error(lang.string('logs.timeline_fetch_failed'));