mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Replace individual RoomProxy properties with a stored RoomInfo. (#3445)
* Store RoomInfo updates in JoinedRoomProxy and read from them directly. * Remove all RoomProxy properties that were reading from the RoomInfo.
This commit is contained in:
@@ -143,7 +143,8 @@ class RoomChangeRolesScreenViewModel: RoomChangeRolesScreenViewModelType, RoomCh
|
||||
let demotingUpdates = state.membersToDemote.map { ($0.id, Int64(0)) }
|
||||
|
||||
// A task we can await until the room's info gets modified with the new power levels.
|
||||
let infoTask = Task { await roomProxy.actionsPublisher.values.first { $0 == .roomInfoUpdate } }
|
||||
// Note: Ignore the first value as the publisher is backed by a current value subject.
|
||||
let infoTask = Task { await roomProxy.infoPublisher.dropFirst().values.first { _ in true } }
|
||||
|
||||
switch await roomProxy.updatePowerLevelsForUsers(promotingUpdates + demotingUpdates) {
|
||||
case .success:
|
||||
|
||||
Reference in New Issue
Block a user