mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Add a developer option button for marking every single room as read (#5582)
This will use an underlying SDK method and send a private read receipt plus a fully read marker in every single room the user is part of. It will most likely be a long operation that will get rate limited so the task is set to run detached for as long as it takes.
This commit is contained in:
@@ -857,6 +857,15 @@ class ClientProxy: ClientProxyProtocol {
|
||||
return .failure(.sdkError(error))
|
||||
}
|
||||
}
|
||||
|
||||
func markAllRoomsAsRead() async -> Result<Void, ClientProxyError> {
|
||||
do {
|
||||
return try await .success(client.markAllRoomsAsRead())
|
||||
} catch {
|
||||
MXLog.error("Failed marking all rooms as read with error: \(error)")
|
||||
return .failure(.sdkError(error))
|
||||
}
|
||||
}
|
||||
|
||||
func storeSizes() async -> Result<StoreSizes, ClientProxyError> {
|
||||
do {
|
||||
|
||||
@@ -245,6 +245,8 @@ protocol ClientProxyProtocol: AnyObject {
|
||||
@discardableResult func clearCaches() async -> Result<Void, ClientProxyError>
|
||||
|
||||
@discardableResult func optimizeStores() async -> Result<Void, ClientProxyError>
|
||||
|
||||
@discardableResult func markAllRoomsAsRead() async -> Result<Void, ClientProxyError>
|
||||
|
||||
func storeSizes() async -> Result<StoreSizes, ClientProxyError>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user