Skip to content

Commit

Permalink
Icon Badge: Only relevant messages #3
Browse files Browse the repository at this point in the history
  • Loading branch information
guruz committed Apr 18, 2020
1 parent 9730d51 commit b18b121
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion quassel-for-ios/quassel-for-ios/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}

Expand Down
3 changes: 1 addition & 2 deletions quassel-for-ios/quassel-for-ios/QuasselBackgroundFetcher.m
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b18b121

Please sign in to comment.