-
-
Notifications
You must be signed in to change notification settings - Fork 639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iOS] Clear notifications when messages are read on desktop/web #3119
Comments
Here's some notes:
|
That is an interesting challenge. Dismissing notifications even 10-20 minutes after being delivered is still good, as a phone sitting idly with notifications growing will just pleasantly dismiss most of these before the user has even seen them. That, in addition to actively dismissing notifications from within a running app sounds like a pretty good solution. |
Yep, I think that's basically the kind of behavior we need -- batched updates limited to 2-3/hr, and actively updating when the app is in the foreground. It'll just require some more wrinkles to implement. (For example, say we send a "silent notification" that things have been read, and then a minute later the user gets another notification and promptly reads that message too. We don't want to send another silent notification right then... but then say they get no more notification-causing messages for hours. At some point we want to send another "silent notification" to say that one was read -- which means we're triggering it from some kind of timer, rather than directly from a request.) |
Does this cover the following issue from #2891? That is, does the title mean to say "...when messages are read on desktop/web/mobile?" I've marked that this is the case, but I may be wrong.
If we have to clear notifications in batches of 2-3 per hour, as Greg mentions, this issue might not be satisfied; the user might like to see them cleared immediately, whereas some delay is probably acceptable if messages are marked as read on desktop/web. |
Hmm, good question! Definitely agree that we want to clear notifications when messages are read within the app, too. And then yeah, because the mechanism for doing so over APNs may be in infrequent batches, we'll want a different mechanism for the app to do so directly when it's in the foreground. There was a bit of discussion of that latter in the thread above, as "actively dismissing notifications from within a running app" / "actively updating when the app is in the foreground". But... because it will be a separate mechanism, it may involve a separate line of work to make that happen, so it may not get resolved at the same time. For that reason I think it'd be good to have a separate issue for that -- also P1, and with a link to this one. |
#4163 is merged! |
When we implement this, we'll also want to clear old notifications whenever we reach over (I'm not sure the OS will even let us get to that many in the first place; and if it does, it's not going to be a good user experience anyway, and you're likely to clear the whole stack of them at once without going through them. So this should rarely be visible in practice. But it lets us be sure we don't get into a particular kind of broken-looking state, while reducing large bursts of data we'd otherwise try to send through APNs.) |
In fact, it appears the OS only keeps our latest 100 notifications in the first place! I recently turned on a notifications firehose for myself by enabling notifications on all my (unmuted) messages in chat.zulip.org, partly in order to better exercise our new Android notifications experience that's set for the next release. As a result I have lots of notifications... particularly on iOS devices (where, per this very issue, we don't remove notifications when the message is read). And just now when coming back to an iPhone 7 running iOS 14.8, I found that I had a suspiciously round number of notifications for Zulip: 100 of them. On an iPad mini 4 running iOS 15.0.2, it doesn't tell me how many notifications I have… but if I tap to expand the list of them and then count them, screenful by screenful, I also find I have 100. As more notifications arrive, the oldest ones disappear off the end. And on the other hand if I dismiss a couple of notifications in the middle of the list, the oldest ones don't reappear to bring the total back up to 100 -- so it's not like there are 100 in view plus more in the wings. When those oldest notifications get evicted to keep it to just 100, they really are gone. So. There's actually nothing for us to do for that point -- we'll have only at most 100 notifications in any case. |
This is a twin of #2634 . That issue covers the remaining steps to get this feature to Android users. All the essential logic for that is in server release 1.9 plus mobile's
master
branch (and so the next release), and what's left is a matter of release management.For iOS, the situation is a bit different. @borisyankov and I spent some time the other day looking through both our code, and Apple's APIs and docs, so we understand this all more concretely than before. To do this effectively, we'll need to make some changes on both the client and the server, though on the server side the core machinery we need is the same that we've already added in zulip/zulip#10094 (and the 1.9 release).
The text was updated successfully, but these errors were encountered: