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
+14
-8
@@ -25,14 +25,7 @@ enum ServerSelectionScreenViewModelAction {
|
||||
|
||||
struct ServerSelectionScreenViewState: BindableState {
|
||||
/// The message to be shown in the text field footer when no error has occurred.
|
||||
private let regularFooterMessage = {
|
||||
let linkPlaceholder = "{link}"
|
||||
var message = AttributedString(L10n.screenChangeServerFormNotice(linkPlaceholder))
|
||||
message.replace(linkPlaceholder,
|
||||
with: L10n.actionLearnMore,
|
||||
asLinkTo: ServiceLocator.shared.settings.slidingSyncLearnMoreURL)
|
||||
return message
|
||||
}()
|
||||
private let regularFooterMessage: AttributedString
|
||||
|
||||
/// View state that can be bound to from SwiftUI.
|
||||
var bindings: ServerSelectionScreenBindings
|
||||
@@ -60,6 +53,19 @@ struct ServerSelectionScreenViewState: BindableState {
|
||||
var hasValidationError: Bool {
|
||||
bindings.homeserverAddress.isEmpty || isShowingFooterError
|
||||
}
|
||||
|
||||
init(slidingSyncLearnMoreURL: URL, bindings: ServerSelectionScreenBindings, footerErrorMessage: String? = nil, isModallyPresented: Bool) {
|
||||
self.bindings = bindings
|
||||
self.footerErrorMessage = footerErrorMessage
|
||||
self.isModallyPresented = isModallyPresented
|
||||
|
||||
let linkPlaceholder = "{link}"
|
||||
var message = AttributedString(L10n.screenChangeServerFormNotice(linkPlaceholder))
|
||||
message.replace(linkPlaceholder,
|
||||
with: L10n.actionLearnMore,
|
||||
asLinkTo: slidingSyncLearnMoreURL)
|
||||
regularFooterMessage = message
|
||||
}
|
||||
}
|
||||
|
||||
struct ServerSelectionScreenBindings {
|
||||
|
||||
Reference in New Issue
Block a user