Skip to content

Node.js based forum software built for the modern web

fix: #9872 update app badge with notification count if applicable

Julian Lam3e69bcdf1f99
diff --git a/public/src/modules/notifications.js b/public/src/modules/notifications.js
index d2b578c19e..0d11293920 100644
--- a/public/src/modules/notifications.js
+++ b/public/src/modules/notifications.js
@@ -139,6 +139,10 @@ define('notifications', [
if (payload.updateFavicon) {
Tinycon.setBubble(count > 99 ? '99+' : count);
}
+
+ if (navigator.setAppBadge) { // feature detection
+ navigator.setAppBadge(count);
+ }
};
Notifications.markAllRead = function () {