Set native app badge for highlights
This commit is contained in:
parent
0642ae58ce
commit
beb9fbd940
@ -100,6 +100,14 @@ store.watch(
|
||||
(_, getters) => getters.highlightCount,
|
||||
(highlightCount) => {
|
||||
favicon.setAttribute("href", highlightCount > 0 ? faviconAlerted : faviconNormal);
|
||||
|
||||
if (navigator.setAppBadge) {
|
||||
if (highlightCount > 0) {
|
||||
navigator.setAppBadge(highlightCount);
|
||||
} else {
|
||||
navigator.clearAppBadge();
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user