Merge pull request #1660 from famedly/krille/clear-room-account-data-on-clear-cache

fix: clearCache does not clear room account data
This commit is contained in:
Karthikeyan S 2023-12-27 13:19:55 +05:30 committed by GitHub
commit 4e76c6df4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View File

@ -270,6 +270,7 @@ class HiveCollectionsDatabase extends DatabaseApi {
Future<void> clearCache() => transaction(() async {
await _roomsBox.clear();
await _accountDataBox.clear();
await _roomAccountDataBox.clear();
await _roomStateBox.clear();
await _roomMembersBox.clear();
await _eventsBox.clear();

View File

@ -286,6 +286,7 @@ class FamedlySdkHiveDatabase extends DatabaseApi {
Future<void> clearCache() async {
await _roomsBox.deleteAll(_roomsBox.keys);
await _accountDataBox.deleteAll(_accountDataBox.keys);
await _roomAccountDataBox.deleteAll(_roomAccountDataBox.keys);
await _roomStateBox.deleteAll(_roomStateBox.keys);
await _roomMembersBox.deleteAll(_roomMembersBox.keys);
await _eventsBox.deleteAll(_eventsBox.keys);

View File

@ -272,6 +272,7 @@ class MatrixSdkDatabase extends DatabaseApi {
Future<void> clearCache() => transaction(() async {
await _roomsBox.clear();
await _accountDataBox.clear();
await _roomAccountDataBox.clear();
await _preloadRoomStateBox.clear();
await _nonPreloadRoomStateBox.clear();
await _roomMembersBox.clear();