Adopt StateStoreViewModelV2 in more screens. (#4275)

* Use StateStoreViewModelV2 in AnalyticsPromptScreen.

* Use StateStoreViewModelV2 in UserProfileScreen.

* Use StateStoreViewModelV2 in MediaUploadPreviewScreen.

* Use StateStoreViewModelV2 in the Roles & Permissions screens.

* Add the asyncStream variant of deferFailure.

* Use StateStoreViewModelV2 in BlockedUsersScreen.

* Use StateStoreViewModelV2 in ManageRoomMemberSheet.

* Use StateStoreViewModelV2 in ResolveVerifiedUserSendFailureScreen.

* Use StateStoreViewModelV2 in ReportContentScreen.

* Use StateStoreViewModelV2 in ReportRoomScreen.

* Use StateStoreViewModelV2 in StaticLocationScreen.

* Use StateStoreViewModelV2 in EmojiPickerScreen.

* Use StateStoreViewModelV2 in PollFormScreen.

* Use StateStoreViewModelV2 in DeclineAndBlockScreen.

* Use StateStoreViewModelV2 in RoomDetailsScreen.

* Fix a random compilation error that just popped up 🤷‍♂️

* Fix expectation message.
This commit is contained in:
Doug
2025-07-02 15:13:42 +01:00
committed by GitHub
parent db3c9f4382
commit c7b562250b
47 changed files with 404 additions and 163 deletions
@@ -26,7 +26,7 @@ class UserProfileScreenViewModelTests: XCTestCase {
userIndicatorController: ServiceLocator.shared.userIndicatorController,
analytics: ServiceLocator.shared.analytics)
let waitForMemberToLoad = deferFulfillment(context.$viewState) { $0.userProfile != nil }
let waitForMemberToLoad = deferFulfillment(context.observe(\.viewState.userProfile)) { $0 != nil }
try await waitForMemberToLoad.fulfill()
XCTAssertFalse(context.viewState.isOwnUser)
@@ -46,7 +46,7 @@ class UserProfileScreenViewModelTests: XCTestCase {
userIndicatorController: ServiceLocator.shared.userIndicatorController,
analytics: ServiceLocator.shared.analytics)
let waitForMemberToLoad = deferFulfillment(context.$viewState) { $0.userProfile != nil }
let waitForMemberToLoad = deferFulfillment(context.observe(\.viewState.userProfile)) { $0 != nil }
try await waitForMemberToLoad.fulfill()
XCTAssertTrue(context.viewState.isOwnUser)