Merge pull request #3845 from thelounge/xpaw/native-badging
Implement native app badges for highlights (Chrome 81+)
This commit is contained in:
commit
dbe1427e7a
@ -101,6 +101,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