Skip to content

Commit

Permalink
Merge pull request #4250 from tloncorp/lb/no-badging
Browse files Browse the repository at this point in the history
native: remove badging for now
  • Loading branch information
latter-bolden authored Dec 4, 2024
2 parents 20bff2c + 4f561db commit 630c907
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ enum NotificationCategory: String {
content.threadIdentifier = yarn.rope.thread
content.title = await yarn.getTitle()
content.body = yarn.body
content.badge = await withUnsafeContinuation { cnt in
UNUserNotificationCenter.current().getDeliveredNotifications { notifs in
cnt.resume(returning: NSNumber(value: notifs.count + 1))
}
}
// content.badge = await withUnsafeContinuation { cnt in
// UNUserNotificationCenter.current().getDeliveredNotifications { notifs in
// cnt.resume(returning: NSNumber(value: notifs.count + 1))
// }
// }
content.categoryIdentifier = yarn.category.rawValue
content.userInfo = yarn.userInfo
content.sound = UNNotificationSound.default
Expand Down
7 changes: 4 additions & 3 deletions packages/app/lib/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,10 @@ async function updatePresentedNotifications(badgeCount?: number) {
})
);

const count =
badgeCount ?? (await Notifications.getPresentedNotificationsAsync()).length;
await Notifications.setBadgeCountAsync(count);
// NOTE: removing badging for now
// const count =
// badgeCount ?? (await Notifications.getPresentedNotificationsAsync()).length;
// await Notifications.setBadgeCountAsync(count);
}

export function useUpdatePresentedNotifications() {
Expand Down

0 comments on commit 630c907

Please sign in to comment.