Skip to content
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

Show notifications for inactive (but logged-in) accounts while the app is foregrounded. #4241

Closed
chrisbobbe opened this issue Aug 27, 2020 · 4 comments

Comments

@chrisbobbe
Copy link
Contributor

chrisbobbe commented Aug 27, 2020

A user on iOS reports here that they'd like to see these notifications.

A post from @gnprice, #3114 (comment), reminds me that we don't actually show any notifications on iOS when the app is foregrounded. (In fact, not only is the visible alert suppressed, but the badge count isn't updated (a latent bug because servers aren't sending badge counts)—I mention this, with a proposed fix, at https://github.com/zulip/zulip-mobile/pull/4163/files#r441233689.)

The not-showing-notifications issue described at #3114 is broader than this issue, though. Ideally, we would even show notifications for the active account, if they refer to messages in a narrow that isn't visible (or perhaps, even for messages that are in the visible narrow but currently off-screen).

I'm filing this new issue, anticipating that we'll want to get there incrementally. First, we'll want to land something like #4163, to fix our confusing iOS dependencies for notifications. But, looking at that PR (and particularly the code near the comment I linked to above), it seems like we need to say in the iOS-native layer whether we want to show or suppress a notification. So, we'll want to either

  • store enough data in that layer for the decision to be made there, or
  • make the decision in the JS layer, and report it to the iOS-native layer somehow

We'll need to do some architecture brainstorming about this; that should probably happen on CZO.

@chrisbobbe
Copy link
Contributor Author

chrisbobbe commented Aug 27, 2020

Marking as blocked by #4163 (it would be a bad idea to build the new architecture on top of our confusing dependencies in this area); I expect it to land relatively soon, though.

@chrisbobbe chrisbobbe added the blocked on other work To come back to after another related PR, or some other task. label Aug 27, 2020
@gnprice gnprice removed the blocked on other work To come back to after another related PR, or some other task. label Jun 18, 2021
@gnprice
Copy link
Member

gnprice commented Jun 18, 2021

#4163 is merged!

@gnprice
Copy link
Member

gnprice commented Nov 10, 2023

In my testing just now, I do indeed get these notifications, on iOS just like on Android. I know we've made some changes to the relevant code in the years since this was filed, and that must have resolved this.

We still don't do the more complex task of suppressing notifications when they're redundant with the conversation you're looking at. But that's tracked as #3114.

@gnprice
Copy link
Member

gnprice commented Nov 21, 2023

Specifically it looks like d4606ab (in #4898) was the change that fixed this, back in 2021-09.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants