Fix a retain cycle on RoomDetailsScreenViewModel.
This was causing the UserSession/Client to stay alive after clearing the cache.
This commit is contained in:
@@ -223,8 +223,8 @@ class RoomDetailsScreenViewModel: RoomDetailsScreenViewModelType, RoomDetailsScr
|
||||
.store(in: &cancellables)
|
||||
|
||||
roomProxy.membersPublisher.combineLatest(roomProxy.identityStatusChangesPublisher)
|
||||
.sink { _ in
|
||||
Task { await self.updateMemberIdentityVerificationStates() }
|
||||
.sink { [weak self] _ in
|
||||
Task { await self?.updateMemberIdentityVerificationStates() }
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
}
|
||||
|
||||
@@ -47,9 +47,9 @@ class RoomMemberDetailsScreenViewModel: RoomMemberDetailsScreenViewModelType, Ro
|
||||
|
||||
roomProxy.identityStatusChangesPublisher
|
||||
.receive(on: DispatchQueue.main)
|
||||
.sink { changes in
|
||||
.sink { [weak self] changes in
|
||||
if changes.map(\.userId).contains(userID) {
|
||||
Task { await self.loadMember() }
|
||||
Task { await self?.loadMember() }
|
||||
}
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
|
||||
Reference in New Issue
Block a user