pull/42/head
Lim Chee Aun 2023-01-03 00:27:47 +08:00
rodzic d235f56cff
commit 9ea941368d
2 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -29,6 +29,7 @@ function Home({ hidden }) {
homeIterator.current = masto.v1.timelines.listHome({
limit: LIMIT,
});
states.homeNew = [];
}
const allStatuses = await homeIterator.current.next();
if (allStatuses.value <= 0) {
@ -47,7 +48,6 @@ function Home({ hidden }) {
});
if (firstLoad) {
states.home = homeValues;
states.homeNew = [];
} else {
states.home.push(...homeValues);
}
@ -256,6 +256,7 @@ function Home({ hidden }) {
);
states.home.unshift(...uniqueHomeNew);
loadStatuses(true);
states.homeNew = [];
scrollableRef.current?.scrollTo({
top: 0,

Wyświetl plik

@ -222,6 +222,7 @@ function Notifications() {
notificationsIterator.current = masto.v1.notifications.list({
limit: LIMIT,
});
states.notificationsNew = [];
}
const allNotifications = await notificationsIterator.current.next();
if (allNotifications.value <= 0) {
@ -235,7 +236,6 @@ function Notifications() {
});
if (firstLoad) {
states.notifications = notificationsValues;
states.notificationsNew = [];
} else {
states.notifications.push(...notificationsValues);
}