Clear cached image after room creation

This commit is contained in:
Florian Renaud
2023-05-11 16:30:20 +02:00
parent 27f6f5cd3b
commit edb2cee361
2 changed files with 5 additions and 0 deletions
@@ -63,4 +63,8 @@ class CreateRoomDataStore @Inject constructor(
fun setPrivacy(privacy: RoomPrivacy?) { fun setPrivacy(privacy: RoomPrivacy?) {
createRoomConfigFlow.tryEmit(createRoomConfigFlow.value.copy(privacy = privacy)) createRoomConfigFlow.tryEmit(createRoomConfigFlow.value.copy(privacy = privacy))
} }
fun clearCachedData() {
cachedAvatarUri = null
}
} }
@@ -135,6 +135,7 @@ class ConfigureRoomPresenter @Inject constructor(
avatar = mxc, avatar = mxc,
) )
matrixClient.createRoom(params).getOrThrow() matrixClient.createRoom(params).getOrThrow()
.also { dataStore.clearCachedData() }
}.execute(createRoomAction) }.execute(createRoomAction)
} }