Fix a regression where the forced logout indicator was presented on the hidden overlay window. (#2063)

This commit is contained in:
Doug
2023-11-10 17:21:02 +00:00
committed by GitHub
parent 5adbb3789e
commit b5cc2cbf61
20 changed files with 88 additions and 17 deletions
@@ -76,7 +76,7 @@ class AppLockScreenViewModel: AppLockScreenViewModelType, AppLockScreenViewModel
state.bindings.alertInfo = .init(id: .confirmResetPIN,
title: L10n.screenAppLockSignoutAlertTitle,
message: L10n.screenAppLockSignoutAlertMessage,
primaryButton: .init(title: L10n.actionOk) { self.actionsSubject.send(.forceLogout) },
primaryButton: .init(title: L10n.actionOk) { self.forceLogout() },
secondaryButton: .init(title: L10n.actionCancel, role: .cancel, action: nil))
}
@@ -90,7 +90,12 @@ class AppLockScreenViewModel: AppLockScreenViewModelType, AppLockScreenViewModel
state.bindings.alertInfo = .init(id: .forcedLogout,
title: L10n.screenAppLockSignoutAlertTitle,
message: L10n.screenAppLockSignoutAlertMessage,
primaryButton: .init(title: L10n.actionOk) { self.actionsSubject.send(.forceLogout) })
primaryButton: .init(title: L10n.actionOk) { self.forceLogout() })
}
}
private func forceLogout() {
state.forcedLogoutIndicator = UserIndicator(type: .modal, title: L10n.commonSigningOut, persistent: true)
actionsSubject.send(.forceLogout)
}
}