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

Notifications: Clear new posts when channel is read #143

Open
abmargb opened this issue Jan 14, 2014 · 3 comments
Open

Notifications: Clear new posts when channel is read #143

abmargb opened this issue Jan 14, 2014 · 3 comments
Labels
Milestone

Comments

@abmargb
Copy link
Collaborator

abmargb commented Jan 14, 2014

The counter for new posts, which is displayed everytime we get a notificatication, is only cleared when we click on the notification. If we read the channel by browsing the app, this counter is never cleared.

@Deminem
Copy link
Member

Deminem commented Jan 28, 2015

@abmargb - Hi Abmar, few things I need to discuss with you regarding the android client notification handling strategy. Currently, the android client try to sync the total notification count with server whenever it receive the push notification for new post on subscribed channels.

Would it be ok? If the android client manage the notification count independently by performing the lookup in local cache (w.r.t post_ID and calculate the count internally) instead of making a sync call with summary.

https://demo.buddycloud.org:443/api/sync?max=31&since=1970-01-01T00:00:00.000Z&summary=true

@abmargb
Copy link
Collaborator Author

abmargb commented Jan 28, 2015

Hi @Deminem, I tried to design it in a way that I wouldn't only rely on push notifications to update data. In that sense, that works like a push-to-pull schema.
IMO, I wouldn't worry much about performing the sync call in background, but one thing you could do is updating the counters as soon you get the push and then fire a sync call with summary.

@Deminem
Copy link
Member

Deminem commented Jan 28, 2015

@abmargb - I agree that notification counters should not be tightly coupled with android push notifications only but it can also update the local summary cache with push-to-pull schema (either manual refresh/auto on-app-start).

My concern is regarding the synchronised state of notification summary across all the devices based on the /api/sync?summary=true. Currently, the above API call always give the false state of totalCounts or in other words actually the same value we define for max=<value> param in the request query.

Why should not we maintain the "new post" count independently on android client? By having said that, first time we download the summary and use it as the base case. Afterwards the android client should always calculate the total count by performing the lookup in local cache w.r.t post_ID (New totalCount = New Posts - Old Posts) on pull-to-refresh/android push notification request triggered. Please let me know your thoughts on this idea?

However, can you please also let me know where on UI we're using (mentionsCount, replyCount, lastWeekActivity, and postsThisWeek)? And are they also meant to be synchronised across all different platforms?

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

No branches or pull requests

2 participants