Improve push notifications (#4896)

Besides the refactoring these improvements:
* Track last push distributor and reset settings and subscription on any
incompatible change (ie. uninstall)
* Only update (push) notification settings on server if needed
* Allow to only fetch notifications for one account (the one for which a
push message was received)

This is (also) the revival of
https://github.com/tuskyapp/Tusky/pull/3642

It's not really well tested so far. (Ie. with two or more accounts or
two or more push providers.)
This commit is contained in:
UlrichKu 2025-02-20 12:27:06 +01:00 committed by GitHub
commit 6450af6edb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 274 additions and 127 deletions

View file

@ -106,7 +106,9 @@ class MainActivityTest {
on { areNotificationsEnabled() } doReturn true
},
mock(),
mock(),
context,
mock(),
)
notificationService.createNotificationChannelsForAccount(accountEntity)