NotificationStore

class NotificationStore(notificationRepository: NotificationRepository, notificationUpdateRepository: NotificationUpdateRepository, notificationStateRepository: NotificationStateRepository, tm: RepositoryTransactionManager, config: MatrixClientConfiguration, statisticCollector: ObservableCacheStatisticCollector, storeScope: CoroutineScope, clock: Clock) : Store

Constructors

Link copied to clipboard
constructor(notificationRepository: NotificationRepository, notificationUpdateRepository: NotificationUpdateRepository, notificationStateRepository: NotificationStateRepository, tm: RepositoryTransactionManager, config: MatrixClientConfiguration, statisticCollector: ObservableCacheStatisticCollector, storeScope: CoroutineScope, clock: Clock)

Functions

Link copied to clipboard
open suspend override fun clearCache()

Only deletes everything, that can be fetched from server.

Link copied to clipboard
suspend fun delete(id: String)
Link copied to clipboard
open suspend override fun deleteAll()

Deletes everything.

Link copied to clipboard
suspend fun deleteByRoomId(roomId: RoomId)
Link copied to clipboard
suspend fun deleteNotificationsByRoomId(roomId: RoomId)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getAll(): Flow<Map<String, Flow<StoredNotification?>>>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open suspend fun init(coroutineScope: CoroutineScope)
Link copied to clipboard
suspend fun save(value: StoredNotification)
suspend fun save(id: String, value: StoredNotification?)
Link copied to clipboard
Link copied to clipboard
suspend fun update(id: String, updater: suspend (oldNotification: StoredNotification?) -> StoredNotification?)
Link copied to clipboard
suspend fun updateState(roomId: RoomId, updater: suspend (oldNotificationState: StoredNotificationState?) -> StoredNotificationState?)
Link copied to clipboard
suspend fun updateUpdate(id: String, updater: suspend (oldNotificationUpdate: StoredNotificationUpdate?) -> StoredNotificationUpdate?)