DM Details have been updated (#2836)

This commit is contained in:
Mauro
2024-05-14 18:47:20 +02:00
committed by GitHub
parent d66ff02d12
commit 2c038c5969
68 changed files with 314 additions and 169 deletions
@@ -174,9 +174,11 @@ class RoomDetailsScreenViewModel: RoomDetailsScreenViewModelType, RoomDetailsScr
.receive(on: DispatchQueue.main)
.sink { [weak self, ownUserID = roomProxy.ownUserID] members in
guard let self else { return }
let accountOwner = members.first(where: { $0.userID == ownUserID })
let dmRecipient = members.first(where: { $0.userID != ownUserID })
self.dmRecipient = dmRecipient
self.state.dmRecipient = dmRecipient.map(RoomMemberDetails.init(withProxy:))
self.state.accountOwner = accountOwner.map(RoomMemberDetails.init(withProxy:))
}
.store(in: &cancellables)