From d9d01439616bbed0d2b910e3cc6361c9d535fa67 Mon Sep 17 00:00:00 2001 From: Marceau TONELLI Date: Tue, 17 Dec 2024 20:17:12 +0100 Subject: [PATCH] Refactor FXIOS-10205 [Swiftlint] Resolve 1 implicitly_unwrapped_optional violations in CreditCardSettingsViewModel (#23808) Resolve warnings in CreditCardSettingsViewModel Co-authored-by: Marceau Tonelli --- .../CreditCardSettingsView/CreditCardSettingsViewModel.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firefox-ios/Client/Frontend/Autofill/CreditCard/CreditCardSettingsView/CreditCardSettingsViewModel.swift b/firefox-ios/Client/Frontend/Autofill/CreditCard/CreditCardSettingsView/CreditCardSettingsViewModel.swift index 744578045f75..1e6430a4807e 100644 --- a/firefox-ios/Client/Frontend/Autofill/CreditCard/CreditCardSettingsView/CreditCardSettingsViewModel.swift +++ b/firefox-ios/Client/Frontend/Autofill/CreditCard/CreditCardSettingsView/CreditCardSettingsViewModel.swift @@ -25,8 +25,8 @@ class CreditCardSettingsViewModel { var appAuthenticator: AppAuthenticationProtocol? lazy var cardInputViewModel = CreditCardInputViewModel(profile: profile) + lazy var toggleModel = ToggleModel(isEnabled: isAutofillEnabled, delegate: self) var tableViewModel = CreditCardTableViewModel() - var toggleModel: ToggleModel! public init(profile: Profile, windowUUID: WindowUUID, @@ -37,7 +37,7 @@ class CreditCardSettingsViewModel { guard let profile = profile as? BrowserProfile else { return } self.autofill = profile.autofill self.appAuthenticator = appAuthenticator - self.toggleModel = ToggleModel(isEnabled: isAutofillEnabled, delegate: self) + tableViewModel.toggleModel = toggleModel }