Address the real lifetime issue of the SDK's Client by making Context.mediaProvider weak. (#4466)

This reverts commit 927aea4bfe.
This commit is contained in:
Doug
2025-09-05 18:18:14 +01:00
committed by GitHub
parent f30f3b1a63
commit c794144ef1
58 changed files with 380 additions and 161 deletions
@@ -32,7 +32,7 @@ class ManageRoomMemberSheetViewModelTests: XCTestCase {
roomProxy: roomProxy,
userIndicatorController: UserIndicatorControllerMock(),
analyticsService: ServiceLocator.shared.analytics,
mediaProvider: MediaProviderMock(configuration: .init()))
mediaProvider: .mock)
let deferred = deferFulfillment(context.observe(\.viewState.bindings.alertInfo)) { $0 != nil }
let deferredAction = deferFulfillment(viewModel.actions) { action in
@@ -63,7 +63,7 @@ class ManageRoomMemberSheetViewModelTests: XCTestCase {
roomProxy: roomProxy,
userIndicatorController: UserIndicatorControllerMock(),
analyticsService: ServiceLocator.shared.analytics,
mediaProvider: MediaProviderMock(configuration: .init()))
mediaProvider: .mock)
let deferred = deferFulfillment(context.observe(\.viewState.bindings.alertInfo)) { $0 != nil }
context.send(viewAction: .ban)
@@ -85,7 +85,7 @@ class ManageRoomMemberSheetViewModelTests: XCTestCase {
roomProxy: roomProxy,
userIndicatorController: UserIndicatorControllerMock(),
analyticsService: ServiceLocator.shared.analytics,
mediaProvider: MediaProviderMock(configuration: .init()))
mediaProvider: .mock)
let deferredAction = deferFulfillment(viewModel.actions) { action in
action == .dismiss(shouldShowDetails: true)