Inline setUnreadCount
// FREEBIE
This commit is contained in:
parent
e1282f9b3b
commit
c4ccf7c8e3
2 changed files with 7 additions and 11 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -25,14 +25,4 @@
|
|||
};
|
||||
var inboxWindowId = 'inbox';
|
||||
|
||||
window.setUnreadCount = function(count) {
|
||||
if (count > 0) {
|
||||
window.setBadgeCount(count);
|
||||
window.document.title = "Signal (" + count + ")";
|
||||
} else {
|
||||
window.setBadgeCount(0);
|
||||
window.document.title = "Signal";
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
|
|
Loading…
Add table
Reference in a new issue