Fix state change commented by mistake and simplify snapshot test setup (+ a couple of warnings)

This commit is contained in:
Stefan Ceriu
2024-12-17 09:31:00 +02:00
committed by Stefan Ceriu
parent 52463cdf8f
commit 598e604851
7 changed files with 72 additions and 41 deletions
@@ -37,8 +37,9 @@ class SecurityAndPrivacyScreenViewModel: SecurityAndPrivacyScreenViewModelType,
state.bindings.alertInfo = .init(id: .enableEncryption,
title: L10n.screenSecurityAndPrivacyEnableEncryptionAlertTitle,
message: L10n.screenSecurityAndPrivacyEnableEncryptionAlertDescription,
primaryButton: .init(title: L10n.screenSecurityAndPrivacyEnableEncryptionAlertConfirmButtonTitle,
action: { [weak self] in self?.state.bindings.desiredSettings.isEncryptionEnabled = true }),
primaryButton: .init(title: L10n.screenSecurityAndPrivacyEnableEncryptionAlertConfirmButtonTitle) { [weak self] in
self?.state.bindings.desiredSettings.isEncryptionEnabled = true
},
secondaryButton: .init(title: L10n.actionCancel, role: .cancel, action: nil))
} else {
state.bindings.desiredSettings.isEncryptionEnabled = false