refactor: Reduce duplication code with UIApplication.keyWindow and .topController and improve alert function

This commit is contained in:
naturecodevoid
2023-06-01 07:35:07 -07:00
parent f69ad9830a
commit 175b5bec95
9 changed files with 57 additions and 57 deletions

View File

@@ -225,7 +225,6 @@ struct SettingsView: View {
Text(L10n.SettingsView.debug)
}
Section {} footer: {
Text("SideStore \(appVersion)")
.multilineTextAlignment(.center)
@@ -257,7 +256,7 @@ struct SettingsView: View {
// }
func connectAppleID() {
guard let rootViewController = UIApplication.shared.keyWindow?.rootViewController else {
guard let rootViewController = UIApplication.topController else {
return
}