More fixes

This commit is contained in:
Lim Chee Aun 2023-01-03 00:27:47 +08:00
parent d235f56cff
commit 9ea941368d
2 changed files with 3 additions and 2 deletions

View file

@ -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,

View file

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