Adopt StateStoreViewModelV2 in the remaining settings screens. (#4158)

* Move the AuthenticationStartScreen into the Authentication directory.

* Commit the updated Sentry license.

No idea why they dropped the 2024 🤷‍♂️

* Use StateStoreViewModelV2 in BugReportScreen.

* Use StateStoreViewModelV2 in UserDetailsEditScreen.

* Use StateStoreViewModelV2 in NotificationSettingsScreen.

* Use StateStoreViewModelV2 in NotificationSettingsEditScreen.

* Use StateStoreViewModelV2 in LegalInformationScreen.

* Use StateStoreViewModelV2 in LogViewerScreen.

* Use StateStoreViewModelV2 in AnalyticsSettingsScreen.

* Rename AdvancedSettingsScreen directory.

* Use StateStoreViewModelV2 in EncryptionResetScreen.

* Use StateStoreViewModelV2 in EncryptionResetPasswordScreen.

* Use StateStoreViewModelV2 in SecureBackup…Screens.

* Use StateStoreViewModelV2 in LoginScreen.

Seems this one was ignored waiting on the fulfillment transitionValues implementation.

* Use StateStoreViewModelV2 in DeactivateAccountScreen.

* Move DeactivateAccountScreen into the Settings directory.
This commit is contained in:
Doug
2025-05-30 12:24:56 +01:00
committed by GitHub
parent 565ca3ab0b
commit 458c6aaa57
54 changed files with 238 additions and 294 deletions
@@ -86,7 +86,7 @@ class LoginScreenViewModelTests: XCTestCase {
XCTAssertFalse(context.viewState.canSubmit, "The form should not be submittable.")
// When updating the view model whilst loading a homeserver.
let deferred = deferFulfillment(context.$viewState, keyPath: \.isLoading, transitionValues: [true, false])
let deferred = deferFulfillment(context.observe(\.viewState.isLoading), transitionValues: [true, false])
context.send(viewAction: .parseUsername)
// Then the view state should represent the loading but never allow submitting to occur.
@@ -105,7 +105,7 @@ class LoginScreenViewModelTests: XCTestCase {
XCTAssertTrue(context.viewState.canSubmit, "The form should be ready to submit.")
// When updating the view model whilst loading a homeserver.
let deferred = deferFulfillment(context.$viewState, keyPath: \.canSubmit, transitionValues: [false, true])
let deferred = deferFulfillment(context.observe(\.viewState.canSubmit), transitionValues: [false, true])
context.send(viewAction: .parseUsername)
// Then the view should be blocked from submitting while loading and then become unblocked again.
@@ -134,7 +134,7 @@ class LoginScreenViewModelTests: XCTestCase {
XCTAssertNil(context.alertInfo, "There shouldn't be an alert when the screen loads.")
// When entering a username for an unsupported homeserver.
let deferred = deferFulfillment(context.$viewState) { $0.bindings.alertInfo != nil }
let deferred = deferFulfillment(context.observe(\.viewState.bindings.alertInfo)) { $0 != nil }
context.username = "@bob:server.net"
context.send(viewAction: .parseUsername)
try await deferred.fulfill()