notify: switch over to new typesafe notifications

This commit is contained in:
William Casarin
2023-07-30 10:50:41 -07:00
parent 80063af19a
commit b40c595a7c
39 changed files with 129 additions and 289 deletions
+3 -3
View File
@@ -72,7 +72,7 @@ struct ConfigView: View {
Section(NSLocalizedString("Sign Out", comment: "Section title for signing out")) {
Button(action: {
if state.keypair.privkey == nil {
notify(.logout, ())
notify(.logout)
} else {
confirm_logout = true
}
@@ -126,7 +126,7 @@ struct ConfigView: View {
return
}
state.postbox.send(ev)
notify(.logout, ())
notify(.logout)
}
}
.alert(NSLocalizedString("Logout", comment: "Alert for logging out the user."), isPresented: $confirm_logout) {
@@ -134,7 +134,7 @@ struct ConfigView: View {
confirm_logout = false
}
Button(NSLocalizedString("Logout", comment: "Button for logging out the user."), role: .destructive) {
notify(.logout, ())
notify(.logout)
}
} message: {
Text("Make sure your nsec account key is saved before you logout or you will lose access to this account", comment: "Reminder message in alert to get customer to verify that their private security account key is saved saved before logging out.")