Inline setUnreadCount

// FREEBIE
This commit is contained in:
lilia
2017-05-03 22:29:06 -07:00
committed by Scott Nonnenberg
parent e1282f9b3b
commit c4ccf7c8e3
2 changed files with 7 additions and 11 deletions

View File

@@ -62,7 +62,13 @@
);
storage.put("unreadCount", newUnreadCount);
setUnreadCount(newUnreadCount);
if (newUnreadCount > 0) {
window.setBadgeCount(newUnreadCount);
window.document.title = "Signal (" + newUnreadCount + ")";
} else {
window.setBadgeCount(0);
window.document.title = "Signal";
}
if (newUnreadCount === 0) {
window.clearAttention();
}