Test fix notification toast appearing after loaded

pull/543/head
Lim Chee Aun 2024-05-28 13:44:02 +08:00
rodzic bd8817e61b
commit ed712d15f1
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -292,8 +292,13 @@ function Notifications({ columnMode }) {
}
}
});
const firstLoad = useRef(true);
useEffect(() => {
let unsub = subscribeKey(states, 'notificationsShowNew', (v) => {
if (firstLoad.current) {
firstLoad.current = false;
return;
}
if (uiState === 'loading') return;
if (v) loadUpdates();
setShowNew(v);