mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Removed unused swipe gesture (+3 squashed commits)
Squashed commits: [d64bb3bb] Stop using the ServiceLocator directly in the ScreenTrackerViewModifier [37c46ab9] Rename Analytics to AnalyticsService [8852a371] #920 - Cleanup ServiceLocator usages
This commit is contained in:
committed by
Stefan Ceriu
parent
b4cd58b209
commit
e6711a0236
+7
-3
@@ -19,12 +19,16 @@ import SwiftUI
|
||||
typealias ServerSelectionScreenViewModelType = StateStoreViewModel<ServerSelectionScreenViewState, ServerSelectionScreenViewAction>
|
||||
|
||||
class ServerSelectionScreenViewModel: ServerSelectionScreenViewModelType, ServerSelectionScreenViewModelProtocol {
|
||||
private let slidingSyncLearnMoreURL: URL
|
||||
|
||||
var callback: (@MainActor (ServerSelectionScreenViewModelAction) -> Void)?
|
||||
|
||||
init(homeserverAddress: String, isModallyPresented: Bool) {
|
||||
init(homeserverAddress: String, slidingSyncLearnMoreURL: URL, isModallyPresented: Bool) {
|
||||
self.slidingSyncLearnMoreURL = slidingSyncLearnMoreURL
|
||||
let bindings = ServerSelectionScreenBindings(homeserverAddress: homeserverAddress)
|
||||
|
||||
super.init(initialViewState: ServerSelectionScreenViewState(bindings: bindings,
|
||||
super.init(initialViewState: ServerSelectionScreenViewState(slidingSyncLearnMoreURL: slidingSyncLearnMoreURL,
|
||||
bindings: bindings,
|
||||
isModallyPresented: isModallyPresented))
|
||||
}
|
||||
|
||||
@@ -46,7 +50,7 @@ class ServerSelectionScreenViewModel: ServerSelectionScreenViewModelType, Server
|
||||
state.footerErrorMessage = message
|
||||
}
|
||||
case .slidingSyncAlert:
|
||||
let openURL = { UIApplication.shared.open(ServiceLocator.shared.settings.slidingSyncLearnMoreURL) }
|
||||
let openURL = { UIApplication.shared.open(self.slidingSyncLearnMoreURL) }
|
||||
state.bindings.alertInfo = AlertInfo(id: .slidingSyncAlert,
|
||||
title: L10n.commonServerNotSupported,
|
||||
message: L10n.screenChangeServerErrorNoSlidingSyncMessage,
|
||||
|
||||
Reference in New Issue
Block a user