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

Notification Count 131 #121

Closed
felixhahnweilheim opened this issue Oct 15, 2023 · 7 comments · Fixed by #124
Closed

Notification Count 131 #121

felixhahnweilheim opened this issue Oct 15, 2023 · 7 comments · Fixed by #124

Comments

@felixhahnweilheim
Copy link

When I get 1 push notification, the app count shows 131 instead of 1.
(When I open the app, only 1 notification is shown.)

(Apart from that the notifications work fine.)

Screenshot_20231015_091227_One UI Home.jpg

app version 1.0.77

Android 13

@luke-
Copy link
Collaborator

luke- commented Oct 16, 2023

Hmm, I cannot reproduce this.

Steps:

  • Closed app, no notification count badge.
  • Trigger notification
  • Notification received, 1 badge appears
  • Click on notification, badge disappers

Btw. we'll plan to sync the HumHub notification count with the App Notification count in the next release: #52

@felixhahnweilheim
Copy link
Author

Hi, I have now also tested with community.humhub.com (luckily someone commented a post, so I got a push notification).
But the notification badge shows again 131.

I have downloaded the app from the Github release (arm64-v8a) version 1.0.77

Android 13

One-UI version 5.1

Samsung Galaxy A51
anything else that could be relevant?

But if you rework the notification count anyway, we can wait for this and I test again with next release.

@luke-
Copy link
Collaborator

luke- commented Oct 16, 2023

@PrimozRatej Any idea?

@PrimozRatej
Copy link
Collaborator

PrimozRatej commented Oct 16, 2023

I checked it the badge count is set only in 2 cases. 1. The user gets a push notification that contains the badge count. 2. updateNotificationCount Js channel is triggered on the web app, and the count is sent over the JS channel. @felixhahnweilheim Is it possible you have 131 unread notifications?

@felixhahnweilheim
Copy link
Author

felixhahnweilheim commented Oct 16, 2023

I tested with 2 of my installations and also community.humhub.com, always the same number: 131

Now I went again to the debug page of the FCM module and tried out "Test notification count".
The new number is shown correctly when there is an unread push notification.

After trying that a few times I removed the unread Android notification and tested again.
Now the notification badge shows 1. :-)

So I guess the number 131 was just left over from "Test notification count". (It seems I already used it earlier.)

But the strange thing is that the count remained even when changing the HumHub instance. I think it should be set to 0 when exiting an instance.

And maybe the FCM Debug page should also have the option to set the count to 0?

@PrimozRatej
Copy link
Collaborator

Yes, I agree the count should reset when the user exits the instance and set to new value when the user logs in to another instance, in the way that updateNotificationCount is called.

@PrimozRatej PrimozRatej linked a pull request Oct 19, 2023 that will close this issue
@PrimozRatej
Copy link
Collaborator

Hey, @luke- I changed the updateNotificationCount functionality, so that when the user logs out of the instance we set it to 0 (badge disappears), now on the web side we would need to call the updateNotificationCount JS channel when the user logs in and pass in the number of the current notification count.

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

Successfully merging a pull request may close this issue.

3 participants