mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Add developer option to optimize the SDK DBs
This commit is contained in:
committed by
Jorge Martin Espinosa
parent
0c60b75709
commit
5d6aa1fcfd
+2
@@ -194,6 +194,8 @@ interface MatrixClient {
|
||||
* Use [Timeline.markAsRead] instead when possible.
|
||||
*/
|
||||
suspend fun markRoomAsFullyRead(roomId: RoomId, eventId: EventId): Result<Unit>
|
||||
|
||||
suspend fun vacuumStores(): Result<Unit>
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+6
@@ -726,6 +726,12 @@ class RustMatrixClient(
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun vacuumStores(): Result<Unit> = withContext(sessionDispatcher) {
|
||||
runCatchingExceptions {
|
||||
innerClient.optimizeStores()
|
||||
}
|
||||
}
|
||||
|
||||
private suspend fun getCacheSize(
|
||||
includeCryptoDb: Boolean = false,
|
||||
): Long = withContext(sessionDispatcher) {
|
||||
|
||||
Reference in New Issue
Block a user