-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
Properly summarize all notifications #4848
Properly summarize all notifications #4848
Conversation
app/src/main/java/com/keylesspalace/tusky/components/systemnotifications/NotificationFetcher.kt
Outdated
Show resolved
Hide resolved
b0eb031
to
d4157fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, works for me.
...src/main/java/com/keylesspalace/tusky/components/systemnotifications/NotificationHelper.java
Show resolved
Hide resolved
app/src/main/java/com/keylesspalace/tusky/components/systemnotifications/NotificationFetcher.kt
Show resolved
Hide resolved
app/src/main/java/com/keylesspalace/tusky/components/systemnotifications/NotificationFetcher.kt
Show resolved
Hide resolved
d4157fc
to
5b872a1
Compare
notificationManagerCompat.notify(newNotifications) | ||
|
||
// NOTE this can schedule multiple (summary) notifications in short succession (normally 1-3). | ||
// They can "collapse" to only one audible one if fast enough. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be outside of the notificationsByType.forEach
loop as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
c585e25
to
0fa77a1
Compare
Tested this now on my (Android 14) device. Seems to work reasonably well. There are of course still odd edge-cases. For example if there are a very many notifications of different types, you will only get one summary. For example "25 favorite notifications" but nothing more. |
Do summary notifications like the Api defines it:
Testing this is probably the most difficult part.
For example I couldn't get any notification to ring with older Api versions in the debugger. (Same as for current develop)
However one hack to always get notifications: Fix "minId" in "fetchNewNotifications()" to a somewhat older value.
Next possible step: Have only one summary notification at all (for all channels/notification types). You can still configure single channels differently.
Or: For very many notifications: Only use a true summary one (something like "you have 28 favorites and 7 boosts").
Generally: The notification timeline must be improved now. Because that must be the go-to solution for any large number of notifications. It must be easy to read. E. g. with grouping per post.