mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-06 20:38:41 +00:00
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)
|
.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)
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user