MatrixRoom API refinement (#719)
- `syncUpdateFlow` becomes a `val` and always returns the same instance of the underlying `StateFlow` instead of different `Flow` instances to allow consumers not to remember the `Flow` and not to specify an unneeded initial value. - `timeline` becomes a `val` as it already always returns the same instance. - Amends calling code accordingly - Removes a few unneeded `val`s in `RustMatrixClient - Fixes a small bug in `MessagesPresenter` that allowed to sometime show a newly created room's name as "Empty room" (changes `LaunchedEffect(syncUpdateFlow)` to `LaunchedEffect(syncUpdateFlow.value)`)
This commit is contained in:
parent
79f7537c0b
commit
b504dbe5f0
8 changed files with 23 additions and 34 deletions
|
|
@ -52,7 +52,7 @@ class RoomDetailsEditPresenter @Inject constructor(
|
|||
|
||||
@Composable
|
||||
override fun present(): RoomDetailsEditState {
|
||||
val roomSyncUpdateFlow = room.syncUpdateFlow().collectAsState(0L)
|
||||
val roomSyncUpdateFlow = room.syncUpdateFlow.collectAsState()
|
||||
|
||||
// Since there is no way to obtain the new avatar uri after uploading a new avatar,
|
||||
// just erase the local value when the room field has changed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue