fix favicon logic (#175)
This commit is contained in:
parent
979b4afc89
commit
18c3064801
|
@ -8,10 +8,10 @@ export function notificationObservers (store) {
|
||||||
if (!process.browser) {
|
if (!process.browser) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
scheduleIdleTask(() => {
|
||||||
if (currentFaviconHasNotifications === hasNotifications) {
|
if (currentFaviconHasNotifications === hasNotifications) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
scheduleIdleTask(() => {
|
|
||||||
setFavicon(hasNotifications ? '/favicon-alert.png' : '/favicon.png')
|
setFavicon(hasNotifications ? '/favicon-alert.png' : '/favicon.png')
|
||||||
currentFaviconHasNotifications = !currentFaviconHasNotifications
|
currentFaviconHasNotifications = !currentFaviconHasNotifications
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue