mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
refactored the ClientProxy to:
- throw an error during the init - to have its init directly instantiate the sync service and the providers Update ElementX/Sources/Services/UserSession/UserSessionStore.swift Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com> renamed
This commit is contained in:
@@ -140,19 +140,19 @@ class JoinRoomScreenViewModel: JoinRoomScreenViewModelType, JoinRoomScreenViewMo
|
||||
roomInfo = invitedRoomProxy.info
|
||||
case .knocked(let knockedRoomProxy):
|
||||
roomInfo = knockedRoomProxy.info
|
||||
if let roomSummaryProvider = clientProxy.staticRoomSummaryProvider {
|
||||
membershipStateChangeCancellable = roomSummaryProvider.roomListPublisher
|
||||
.compactMap { summaries -> Void? in
|
||||
guard let roomSummary = summaries.first(where: { $0.id == roomInfo?.id }),
|
||||
roomSummary.roomListItem.membership() != .knocked else {
|
||||
return nil
|
||||
}
|
||||
return ()
|
||||
membershipStateChangeCancellable = clientProxy
|
||||
.staticRoomSummaryProvider
|
||||
.roomListPublisher
|
||||
.compactMap { summaries -> Void? in
|
||||
guard let roomSummary = summaries.first(where: { $0.id == roomInfo?.id }),
|
||||
roomSummary.roomListItem.membership() != .knocked else {
|
||||
return nil
|
||||
}
|
||||
.sink { [weak self] in
|
||||
Task { await self?.loadRoomDetails() }
|
||||
}
|
||||
}
|
||||
return ()
|
||||
}
|
||||
.sink { [weak self] in
|
||||
Task { await self?.loadRoomDetails() }
|
||||
}
|
||||
case .banned(let bannedRoomProxy):
|
||||
roomInfo = bannedRoomProxy.info
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user