Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
android notif: Fix bugs in un-notifying read messages
I added this TODO comment a few commits ago, based on studying the code, and just now I confirmed that the bug happens empirically: reading several conversations at once can leave behind a ghost group. There's also a related bug when the user reads a conversation whose notification has already been dismissed: if there's just one active notification remaining, we'll end up dismissing the whole group and that notification with it. The root cause of both of these is that we're relying on an assumption that the loop looking for notifications to cancel found exactly one such notification. In fact it may have found fewer or more than that. This can cause this code to leave the summary notification in place when it should cancel it, and vice versa. To fix, while we're looping through the notifications in order to possibly cancel some, we just note whether there are also any (in the same group) that we aren't cancelling. Fixes: zulip#5119 Fixes: zulip#5120
- Loading branch information