From b18b121317cea1e1cd4b0774872019a5b94780c8 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Sat, 18 Apr 2020 19:00:01 +0200 Subject: [PATCH] Icon Badge: Only relevant messages #3 --- quassel-for-ios/quassel-for-ios/AppDelegate.m | 2 +- quassel-for-ios/quassel-for-ios/QuasselBackgroundFetcher.m | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/quassel-for-ios/quassel-for-ios/AppDelegate.m b/quassel-for-ios/quassel-for-ios/AppDelegate.m index 73ef0fd..0444d97 100644 --- a/quassel-for-ios/quassel-for-ios/AppDelegate.m +++ b/quassel-for-ios/quassel-for-ios/AppDelegate.m @@ -426,7 +426,7 @@ - (void) updateLastSeen:(BufferId*)bufferId messageId:(MsgId*)msgId } - (void) updateAppBadge { - int unreadCount = [quasselCoreConnection computeUnreadCountForAllBuffers]; // FIXME only relevant buffers + int unreadCount = [quasselCoreConnection computeRelevantUnreadCount]; [[UIApplication sharedApplication] setApplicationIconBadgeNumber:unreadCount]; } diff --git a/quassel-for-ios/quassel-for-ios/QuasselBackgroundFetcher.m b/quassel-for-ios/quassel-for-ios/QuasselBackgroundFetcher.m index 0da516f..6864c99 100644 --- a/quassel-for-ios/quassel-for-ios/QuasselBackgroundFetcher.m +++ b/quassel-for-ios/quassel-for-ios/QuasselBackgroundFetcher.m @@ -95,8 +95,7 @@ - (void)quasselSwitchToBuffer:(BufferId *)bufferId { - (void) quasselFullyConnected { NSLog(@"Fully connected"); - // FIXME only relevant buffers - int unreadCount = [self.quasselCoreConnection computeUnreadCountForAllBuffers];// computeRelevantUnreadCount + int unreadCount = [self.quasselCoreConnection computeRelevantUnreadCount]; NSInteger badgeBefore = [UIApplication sharedApplication].applicationIconBadgeNumber; NSLog(@"unread before %ld now %d", (long)badgeBefore, unreadCount); if (badgeBefore != unreadCount) {