mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 15:45:11 +00:00
Fixes #3146 - Remove the account migration screen
This commit is contained in:
committed by
Stefan Ceriu
parent
cce42a7126
commit
6759a66533
@@ -188,17 +188,11 @@ struct HomeScreen: View {
|
||||
// MARK: - Previews
|
||||
|
||||
struct HomeScreen_Previews: PreviewProvider, TestablePreview {
|
||||
static let migratingViewModel = viewModel(.migration)
|
||||
static let loadingViewModel = viewModel(.skeletons)
|
||||
static let emptyViewModel = viewModel(.empty)
|
||||
static let loadedViewModel = viewModel(.rooms)
|
||||
|
||||
static var previews: some View {
|
||||
NavigationStack {
|
||||
HomeScreen(context: migratingViewModel.context)
|
||||
}
|
||||
.previewDisplayName("Migrating")
|
||||
|
||||
NavigationStack {
|
||||
HomeScreen(context: loadingViewModel.context)
|
||||
}
|
||||
@@ -218,14 +212,9 @@ struct HomeScreen_Previews: PreviewProvider, TestablePreview {
|
||||
}
|
||||
|
||||
static func viewModel(_ mode: HomeScreenRoomListMode) -> HomeScreenViewModel {
|
||||
let userID = mode == .migration ? "@unmigrated_alice:example.com" : "@alice:example.com"
|
||||
|
||||
let appSettings = AppSettings() // This uses shared storage under the hood
|
||||
appSettings.migratedAccounts[userID] = mode != .migration
|
||||
let userID = "@alice:example.com"
|
||||
|
||||
let roomSummaryProviderState: RoomSummaryProviderMockConfigurationState = switch mode {
|
||||
case .migration:
|
||||
.loading
|
||||
case .skeletons:
|
||||
.loading
|
||||
case .empty:
|
||||
@@ -241,7 +230,7 @@ struct HomeScreen_Previews: PreviewProvider, TestablePreview {
|
||||
|
||||
return HomeScreenViewModel(userSession: userSession,
|
||||
analyticsService: ServiceLocator.shared.analytics,
|
||||
appSettings: appSettings,
|
||||
appSettings: ServiceLocator.shared.settings,
|
||||
selectedRoomPublisher: CurrentValueSubject<String?, Never>(nil).asCurrentValuePublisher(),
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user