mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:31:27 +00:00
Run SwiftFormat.
This commit is contained in:
@@ -48,7 +48,7 @@ final class AppLockScreenCoordinator: CoordinatorProtocol {
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
}
|
||||
|
||||
|
||||
func toPresentable() -> AnyView {
|
||||
AnyView(AppLockScreen(context: viewModel.context))
|
||||
}
|
||||
|
||||
@@ -30,12 +30,12 @@ struct AppLockScreenViewState: BindableState {
|
||||
var numberOfDigitsEntered: Int {
|
||||
bindings.pinCode.count
|
||||
}
|
||||
|
||||
|
||||
/// Whether the subtitle is in a warning state or not.
|
||||
var isSubtitleWarning: Bool {
|
||||
numberOfPINAttempts > 0
|
||||
}
|
||||
|
||||
|
||||
/// The string shown in the screen's subtitle.
|
||||
var subtitle: String {
|
||||
if !isSubtitleWarning {
|
||||
|
||||
@@ -18,7 +18,7 @@ class AppLockScreenViewModel: AppLockScreenViewModelType, AppLockScreenViewModel
|
||||
var actions: AnyPublisher<AppLockScreenViewModelAction, Never> {
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
|
||||
init(appLockService: AppLockServiceProtocol) {
|
||||
self.appLockService = appLockService
|
||||
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ final class AppLockSetupBiometricsScreenCoordinator: CoordinatorProtocol {
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
}
|
||||
|
||||
|
||||
func toPresentable() -> AnyView {
|
||||
AnyView(AppLockSetupBiometricsScreen(context: viewModel.context))
|
||||
}
|
||||
|
||||
+2
-2
@@ -20,11 +20,11 @@ struct AppLockSetupBiometricsScreenViewState: BindableState {
|
||||
var icon: SFSymbol {
|
||||
biometryType.systemSymbol
|
||||
}
|
||||
|
||||
|
||||
var title: String {
|
||||
L10n.screenAppLockSetupBiometricUnlockAllowTitle(biometryType.localizedString)
|
||||
}
|
||||
|
||||
|
||||
var subtitle: String {
|
||||
L10n.screenAppLockSetupBiometricUnlockSubtitle(biometryType.localizedString)
|
||||
}
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ class AppLockSetupBiometricsScreenViewModel: AppLockSetupBiometricsScreenViewMod
|
||||
var actions: AnyPublisher<AppLockSetupBiometricsScreenViewModelAction, Never> {
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
|
||||
init(appLockService: AppLockServiceProtocol) {
|
||||
self.appLockService = appLockService
|
||||
super.init(initialViewState: AppLockSetupBiometricsScreenViewState(biometryType: appLockService.biometryType))
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ final class AppLockSetupPINScreenCoordinator: CoordinatorProtocol {
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
}
|
||||
|
||||
|
||||
func toPresentable() -> AnyView {
|
||||
AnyView(AppLockSetupPINScreen(context: viewModel.context))
|
||||
}
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ struct AppLockSetupPINScreenViewState: BindableState {
|
||||
var isSubtitleWarning: Bool {
|
||||
mode == .unlock && numberOfUnlockAttempts > 0
|
||||
}
|
||||
|
||||
|
||||
var subtitle: String {
|
||||
guard mode == .unlock else { return L10n.screenAppLockSetupPinContext(InfoPlistReader.main.bundleDisplayName) }
|
||||
if !isSubtitleWarning {
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ class AppLockSetupPINScreenViewModel: AppLockSetupPINScreenViewModelType, AppLoc
|
||||
var actions: AnyPublisher<AppLockSetupPINScreenViewModelAction, Never> {
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
|
||||
init(initialMode: AppLockSetupPINScreenMode, isMandatory: Bool, appLockService: AppLockServiceProtocol) {
|
||||
self.appLockService = appLockService
|
||||
|
||||
@@ -103,7 +103,7 @@ class AppLockSetupPINScreenViewModel: AppLockSetupPINScreenViewModelType, AppLoc
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
actionsSubject.send(.complete)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ final class AppLockSetupSettingsScreenCoordinator: CoordinatorProtocol {
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
}
|
||||
|
||||
|
||||
func toPresentable() -> AnyView {
|
||||
AnyView(AppLockSetupSettingsScreen(context: viewModel.context))
|
||||
}
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ struct AppLockSetupSettingsScreenViewState: BindableState {
|
||||
var supportsBiometrics: Bool {
|
||||
biometryType != .none
|
||||
}
|
||||
|
||||
|
||||
var enableBiometricsTitle: String {
|
||||
L10n.screenAppLockSetupBiometricUnlockAllowTitle(biometryType.localizedString)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user