mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-25 10:45:41 +03:00
Always clear 'new' when load from beginning
This commit is contained in:
parent
5074716378
commit
d235f56cff
2 changed files with 2 additions and 2 deletions
|
@ -47,6 +47,7 @@ function Home({ hidden }) {
|
|||
});
|
||||
if (firstLoad) {
|
||||
states.home = homeValues;
|
||||
states.homeNew = [];
|
||||
} else {
|
||||
states.home.push(...homeValues);
|
||||
}
|
||||
|
@ -255,7 +256,6 @@ function Home({ hidden }) {
|
|||
);
|
||||
states.home.unshift(...uniqueHomeNew);
|
||||
loadStatuses(true);
|
||||
states.homeNew = [];
|
||||
|
||||
scrollableRef.current?.scrollTo({
|
||||
top: 0,
|
||||
|
|
|
@ -235,6 +235,7 @@ function Notifications() {
|
|||
});
|
||||
if (firstLoad) {
|
||||
states.notifications = notificationsValues;
|
||||
states.notificationsNew = [];
|
||||
} else {
|
||||
states.notifications.push(...notificationsValues);
|
||||
}
|
||||
|
@ -257,7 +258,6 @@ function Notifications() {
|
|||
|
||||
useEffect(() => {
|
||||
loadNotifications(true);
|
||||
states.notificationsNew = [];
|
||||
}, []);
|
||||
|
||||
const scrollableRef = useRef();
|
||||
|
|
Loading…
Reference in a new issue