mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-25 18:55:44 +03:00
Test fix notification toast appearing after loaded
This commit is contained in:
parent
bd8817e61b
commit
ed712d15f1
1 changed files with 5 additions and 0 deletions
|
@ -292,8 +292,13 @@ function Notifications({ columnMode }) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const firstLoad = useRef(true);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let unsub = subscribeKey(states, 'notificationsShowNew', (v) => {
|
let unsub = subscribeKey(states, 'notificationsShowNew', (v) => {
|
||||||
|
if (firstLoad.current) {
|
||||||
|
firstLoad.current = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (uiState === 'loading') return;
|
if (uiState === 'loading') return;
|
||||||
if (v) loadUpdates();
|
if (v) loadUpdates();
|
||||||
setShowNew(v);
|
setShowNew(v);
|
||||||
|
|
Loading…
Reference in a new issue