Clear cached image after room creation

This commit is contained in:
Florian Renaud 2023-05-11 16:30:20 +02:00
parent 5a0665a27a
commit 1b1dbca96b
2 changed files with 5 additions and 0 deletions

View file

@ -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
}
} }

View file

@ -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)
} }