mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-09 01:26:24 +01:00
More fixes
This commit is contained in:
parent
d235f56cff
commit
9ea941368d
2 changed files with 3 additions and 2 deletions
|
@ -29,6 +29,7 @@ function Home({ hidden }) {
|
||||||
homeIterator.current = masto.v1.timelines.listHome({
|
homeIterator.current = masto.v1.timelines.listHome({
|
||||||
limit: LIMIT,
|
limit: LIMIT,
|
||||||
});
|
});
|
||||||
|
states.homeNew = [];
|
||||||
}
|
}
|
||||||
const allStatuses = await homeIterator.current.next();
|
const allStatuses = await homeIterator.current.next();
|
||||||
if (allStatuses.value <= 0) {
|
if (allStatuses.value <= 0) {
|
||||||
|
@ -47,7 +48,6 @@ function Home({ hidden }) {
|
||||||
});
|
});
|
||||||
if (firstLoad) {
|
if (firstLoad) {
|
||||||
states.home = homeValues;
|
states.home = homeValues;
|
||||||
states.homeNew = [];
|
|
||||||
} else {
|
} else {
|
||||||
states.home.push(...homeValues);
|
states.home.push(...homeValues);
|
||||||
}
|
}
|
||||||
|
@ -256,6 +256,7 @@ function Home({ hidden }) {
|
||||||
);
|
);
|
||||||
states.home.unshift(...uniqueHomeNew);
|
states.home.unshift(...uniqueHomeNew);
|
||||||
loadStatuses(true);
|
loadStatuses(true);
|
||||||
|
states.homeNew = [];
|
||||||
|
|
||||||
scrollableRef.current?.scrollTo({
|
scrollableRef.current?.scrollTo({
|
||||||
top: 0,
|
top: 0,
|
||||||
|
|
|
@ -222,6 +222,7 @@ function Notifications() {
|
||||||
notificationsIterator.current = masto.v1.notifications.list({
|
notificationsIterator.current = masto.v1.notifications.list({
|
||||||
limit: LIMIT,
|
limit: LIMIT,
|
||||||
});
|
});
|
||||||
|
states.notificationsNew = [];
|
||||||
}
|
}
|
||||||
const allNotifications = await notificationsIterator.current.next();
|
const allNotifications = await notificationsIterator.current.next();
|
||||||
if (allNotifications.value <= 0) {
|
if (allNotifications.value <= 0) {
|
||||||
|
@ -235,7 +236,6 @@ function Notifications() {
|
||||||
});
|
});
|
||||||
if (firstLoad) {
|
if (firstLoad) {
|
||||||
states.notifications = notificationsValues;
|
states.notifications = notificationsValues;
|
||||||
states.notificationsNew = [];
|
|
||||||
} else {
|
} else {
|
||||||
states.notifications.push(...notificationsValues);
|
states.notifications.push(...notificationsValues);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue