mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-23 14:13:21 +01:00
Hide "new notifications" button early
This commit is contained in:
parent
1f78bb9c09
commit
afb80d3dc6
1 changed files with 2 additions and 1 deletions
|
@ -54,6 +54,8 @@ function Notifications({ columnMode }) {
|
||||||
|
|
||||||
const notificationsIterator = useRef();
|
const notificationsIterator = useRef();
|
||||||
async function fetchNotifications(firstLoad) {
|
async function fetchNotifications(firstLoad) {
|
||||||
|
states.notificationsShowNew = false; // Hide "new notifications" button early
|
||||||
|
|
||||||
if (firstLoad || !notificationsIterator.current) {
|
if (firstLoad || !notificationsIterator.current) {
|
||||||
// Reset iterator
|
// Reset iterator
|
||||||
notificationsIterator.current = masto.v1.notifications.list({
|
notificationsIterator.current = masto.v1.notifications.list({
|
||||||
|
@ -90,7 +92,6 @@ function Notifications({ columnMode }) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
states.notificationsShowNew = false;
|
|
||||||
states.notificationsLastFetchTime = Date.now();
|
states.notificationsLastFetchTime = Date.now();
|
||||||
return allNotifications;
|
return allNotifications;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue