-
Notifications
You must be signed in to change notification settings - Fork 26
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
Feature: display local notification - Part 0 #248
Conversation
Do we really need to store the notifications? Can't we do something like the following:
|
Actually, I didn't think in that way. But I think it is a better solution. The current app is saving notifications in separate table and there is no relation between notifications and unread/read messages. So if the user reads the message from somewhere(web, iOS or whatever), its related notification will not be canceled. About implementation, should we add two columns ( cc @mejdoo |
I am not sure we need to worry about dismissing of notifications and the At least most chat applications that I see on Android will show the messages again in the notification if there's a new message. For example:
At least is how I am used to see it. Isn't it how the app currently works? Still, the One extra benefit of a similar approach over storing notifications in the database, is that we don't need to store and manage states of two things (notifications and messages), only worrying about messages and if they're read or not. |
Ah yes, I didn't notice about this before with other messaging apps. The current app is not doing this, once the notification is dismissed we will not display older unread messages. I don't know if we proceed in this way or not, maybe we should ask the product team. |
It's pretty much clear we need a product decision to change the behaviour of the current app. We can discuss with Eva in the standup today @ohassine I like this idea of adding Another solution to avoid duplications, you can define a relationship between the tables |
Yes in the same group of |
Closed based on the discussion above |
What's new in this PR?
Jira US : https://wearezeta.atlassian.net/browse/AR-438
In this PR, I added a new table to user database called
notification
.Also I prepared some methods that will be used in next PRs.
We need to store messages (that have to be displayed in notification) in order to group notifications by conversation name.
If we don't store messages somewhere, older notifications will be erased once a newer one is received.