Notification policy (#4768)
This was so much work wow. I think it works pretty well and is the best compromise between all the alternative we considered. Yes the pull-to-refreh on the notifications works slightly different now when the new bar is visible, but I don't think there is a way around that. Things I plan to do later, i.e. not as part of this PR or release: - Cache the notification policy summary for better offline behavior and less view shifting when it loads - try to reduce some of the code duplications that are now in there - if there is user demand, add a "legacy mode" setting where this feature is disabled even if the server would support it closes #4331 closes #4550 as won't do closes #4712 as won't do <img src="https://github.com/user-attachments/assets/de322d3c-3775-41e7-be57-28ab7fbaecdf" width="240"/> <img src="https://github.com/user-attachments/assets/1ce958a4-4f15-484c-a337-5ad93f36046c" width="240"/> <img src="https://github.com/user-attachments/assets/98b0482b-1c05-4c99-a371-f7f4d8a69abd" width="240"/>
This commit is contained in:
parent
29914f8fd9
commit
cd57352cbd
42 changed files with 2401 additions and 97 deletions
|
|
@ -80,7 +80,7 @@ class NotificationsRemoteMediatorTest {
|
|||
val remoteMediator = NotificationsRemoteMediator(
|
||||
accountManager = accountManager,
|
||||
api = mock {
|
||||
onBlocking { notifications(anyOrNull(), anyOrNull(), anyOrNull(), anyOrNull(), anyOrNull()) } doReturn Response.error(500, "".toResponseBody())
|
||||
onBlocking { notifications(anyOrNull(), anyOrNull(), anyOrNull(), anyOrNull(), anyOrNull(), anyOrNull()) } doReturn Response.error(500, "".toResponseBody())
|
||||
},
|
||||
db = db,
|
||||
excludes = emptySet()
|
||||
|
|
@ -99,7 +99,7 @@ class NotificationsRemoteMediatorTest {
|
|||
val remoteMediator = NotificationsRemoteMediator(
|
||||
accountManager = accountManager,
|
||||
api = mock {
|
||||
onBlocking { notifications(anyOrNull(), anyOrNull(), anyOrNull(), anyOrNull(), anyOrNull()) } doThrow IOException()
|
||||
onBlocking { notifications(anyOrNull(), anyOrNull(), anyOrNull(), anyOrNull(), anyOrNull(), anyOrNull()) } doThrow IOException()
|
||||
},
|
||||
db = db,
|
||||
excludes = emptySet()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue