pachli-android/app/schemas/com.keylesspalace.tusky.db.AppDatabase
Nik Clayton 81b15e72f3
Only fetch and display a given notification once (#3626)
When fetching:

- Maintain a marker with the position of the newest fetched notification
- Use the marker to determine which notifications to fetch
- Fetch notifications with min_id to ensure that none are lost
- Update the marker as necessary
- Perform a one-time immediate fetch of notifications on startup

When creating notifications:

- Identify each notification with tag=${MastodonNotificationId}, id=${account.id}
- Remove activeNotifications field, it's no longer necessary
- Use the tag/id tuple to reliably identify existing notifications and avoid creating duplicates
- Cancelling notifications for an account must iterate over all the notifications, and individually remove the notifications that exist for that account.
- Limit notifications to a maximum of 40 (excluding summary notifications)
- Remove notifications (oldest first) to get under this limit
- Rate limit notification creation to 1 per second, so the OS won't drop them

Adjust the summary notification:

- Ensure the summary notification and the child notifications have the same group key
- Dismiss the summary notification if there is only one child notification

NotificationClearBroadcastReceiver is no longer needed, so remove it, and the need for deletePendingIntent.

Fixes #3625, #3539
2023-05-13 16:00:28 +02:00
..
2018-12-25 20:06:28 +01:00
2019-01-14 22:05:08 +01:00
2019-05-02 19:44:35 +02:00
2019-05-30 21:02:59 +02:00
2019-08-22 20:30:08 +02:00
2019-11-19 10:15:32 +01:00
2019-12-19 19:09:40 +01:00
2020-12-23 12:52:39 +01:00
2021-01-21 18:57:09 +01:00
2021-05-16 19:17:56 +02:00
2021-06-17 18:54:56 +02:00
2022-01-11 19:00:29 +01:00
2022-03-28 18:39:16 +02:00
2022-04-15 13:20:27 +02:00
2022-05-11 07:43:30 +02:00
2022-05-30 19:06:14 +02:00
2022-06-20 16:52:01 +02:00
2022-11-24 15:45:19 +01:00
2022-12-29 19:29:33 +01:00