Fix for latest canary
This commit is contained in:
parent
cac307d1fc
commit
e6dc026708
1 changed files with 11 additions and 7 deletions
|
@ -15,6 +15,7 @@ let NotificationSettingsStore: any;
|
|||
export function setBadge() {
|
||||
if (Settings.store.appBadge === false) return;
|
||||
|
||||
try {
|
||||
const mentionCount = GuildReadStateStore.getTotalMentionCount();
|
||||
const pendingRequests = RelationshipStore.getPendingCount();
|
||||
const hasUnread = GuildReadStateStore.hasAnyUnread();
|
||||
|
@ -24,6 +25,9 @@ export function setBadge() {
|
|||
if (!totalCount && hasUnread && !disableUnreadBadge) totalCount = -1;
|
||||
|
||||
VesktopNative.app.setBadgeCount(totalCount);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
let toFind = 3;
|
||||
|
|
Loading…
Reference in a new issue