Fix a retain cycle on RoomDetailsScreenViewModel.

This was causing the UserSession/Client to stay alive after clearing the cache.
This commit is contained in:
Doug
2025-09-02 16:56:25 +01:00
committed by Doug
parent 1be6aff281
commit af5ebf8cae
2 changed files with 4 additions and 4 deletions
@@ -223,8 +223,8 @@ class RoomDetailsScreenViewModel: RoomDetailsScreenViewModelType, RoomDetailsScr
.store(in: &cancellables) .store(in: &cancellables)
roomProxy.membersPublisher.combineLatest(roomProxy.identityStatusChangesPublisher) roomProxy.membersPublisher.combineLatest(roomProxy.identityStatusChangesPublisher)
.sink { _ in .sink { [weak self] _ in
Task { await self.updateMemberIdentityVerificationStates() } Task { await self?.updateMemberIdentityVerificationStates() }
} }
.store(in: &cancellables) .store(in: &cancellables)
} }
@@ -47,9 +47,9 @@ class RoomMemberDetailsScreenViewModel: RoomMemberDetailsScreenViewModelType, Ro
roomProxy.identityStatusChangesPublisher roomProxy.identityStatusChangesPublisher
.receive(on: DispatchQueue.main) .receive(on: DispatchQueue.main)
.sink { changes in .sink { [weak self] changes in
if changes.map(\.userId).contains(userID) { if changes.map(\.userId).contains(userID) {
Task { await self.loadMember() } Task { await self?.loadMember() }
} }
} }
.store(in: &cancellables) .store(in: &cancellables)