Dismiss notifications for rooms fully read in other devices (#7846)

* Dismiss notifications for rooms fully read in other devices
This commit is contained in:
Jorge Martin Espinosa
2026-10-05 17:56:16 +02:00
committed by GitHub
parent 774b4087f5
commit b76548f9a2
7 changed files with 404 additions and 15 deletions
@@ -21,7 +21,8 @@ class FakeNotificationCleaner(
private val clearMessagesForThreadLambda: (SessionId, RoomId, ThreadId) -> Unit = { _, _, _ -> lambdaError() },
private val clearEventLambda: (SessionId, EventId) -> Unit = { _, _ -> lambdaError() },
private val clearMembershipNotificationForSessionLambda: (SessionId) -> Unit = { lambdaError() },
private val clearMembershipNotificationForRoomLambda: (SessionId, RoomId) -> Unit = { _, _ -> lambdaError() }
private val clearMembershipNotificationForRoomLambda: (SessionId, RoomId) -> Unit = { _, _ -> lambdaError() },
private val clearReadRoomsNotificationsLambda: (SessionId) -> Unit = { lambdaError() },
) : NotificationCleaner {
override fun clearAllMessagesEvents(sessionId: SessionId) {
clearAllMessagesEventsLambda(sessionId)
@@ -46,4 +47,8 @@ class FakeNotificationCleaner(
override fun clearMembershipNotificationForRoom(sessionId: SessionId, roomId: RoomId) {
clearMembershipNotificationForRoomLambda(sessionId, roomId)
}
override fun clearReadRoomsNotifications(sessionId: SessionId) {
clearReadRoomsNotificationsLambda(sessionId)
}
}