Removed 'This cannot be undone and data will be lost.', only discourages user

This commit is contained in:
dankito 2020-09-03 11:50:56 +02:00
parent e85273b2d6
commit 7204ddd90e
5 changed files with 12 additions and 8 deletions

View File

@ -72,6 +72,7 @@
36C4009824D23580005227AD /* SwiftBankIconFinderTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36C4009724D23580005227AD /* SwiftBankIconFinderTest.swift */; };
36C4009B24D2F9E4005227AD /* IconedTitleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36C4009A24D2F9E4005227AD /* IconedTitleView.swift */; };
36C4009D24D3236B005227AD /* UrlUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36C4009C24D3236B005227AD /* UrlUtil.swift */; };
36D60F7924FFB6F100596ABC /* Messages.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36D60F7824FFB6F100596ABC /* Messages.swift */; };
36E21ECB24D88DF000649DC8 /* UIKitExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E21ECA24D88DF000649DC8 /* UIKitExtensions.swift */; };
36E21ECF24DA0EEE00649DC8 /* IconView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E21ECE24DA0EEE00649DC8 /* IconView.swift */; };
36E21ED124DC540400649DC8 /* SettingsDialog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E21ED024DC540400649DC8 /* SettingsDialog.swift */; };
@ -196,6 +197,7 @@
36C4009724D23580005227AD /* SwiftBankIconFinderTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SwiftBankIconFinderTest.swift; path = BankingiOSAppTests/BankIconFinder/SwiftBankIconFinderTest.swift; sourceTree = SOURCE_ROOT; };
36C4009A24D2F9E4005227AD /* IconedTitleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IconedTitleView.swift; sourceTree = "<group>"; };
36C4009C24D3236B005227AD /* UrlUtil.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UrlUtil.swift; sourceTree = "<group>"; };
36D60F7824FFB6F100596ABC /* Messages.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Messages.swift; sourceTree = "<group>"; };
36E21ECA24D88DF000649DC8 /* UIKitExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIKitExtensions.swift; sourceTree = "<group>"; };
36E21ECE24DA0EEE00649DC8 /* IconView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IconView.swift; sourceTree = "<group>"; };
36E21ED024DC540400649DC8 /* SettingsDialog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsDialog.swift; sourceTree = "<group>"; };
@ -418,6 +420,7 @@
36BCF86224BA5097005BEC29 /* SwiftUiRouter.swift */,
36BCF86D24BA691B005BEC29 /* DependencyInjector.swift */,
36BCF88824C0A7D7005BEC29 /* Message.swift */,
36D60F7824FFB6F100596ABC /* Messages.swift */,
36BE068824CE288800CBBB68 /* CollapsibleText.swift */,
36BE068A24CE3B0400CBBB68 /* SwiftExtensions.swift */,
36BE068C24CE41E700CBBB68 /* Styles.swift */,
@ -635,6 +638,7 @@
buildActionMask = 2147483647;
files = (
36BE065924CA3CAB00CBBB68 /* UIKitSearchBar.swift in Sources */,
36D60F7924FFB6F100596ABC /* Messages.swift in Sources */,
36BE06C824D0DE7400CBBB68 /* UIKitTextField.swift in Sources */,
36BE064F24C9A17F00CBBB68 /* ImageTanView.swift in Sources */,
36E21EDB24DC990300649DC8 /* LabelledUIKitTextField.swift in Sources */,

View File

@ -112,8 +112,8 @@
"Unsaved changes" = "Unsaved changes";
"Changed data hasn't been saved. Are you sure you want to discard them?" = "Changed data hasn't been saved. Are you sure you want to discard them?";
"Delete account?" = "Delete account?";
"Really delete account '%@'? This cannot be undone and data will be lost." = "Really delete account '%@'?\n\nThis cannot be undone and data will be lost.";
"Really delete account '%@'?" = "Really delete account '%@'?";
"All data for this account will be permanently deleted locally." = "All data for this account will be permanently deleted locally and can only be restored and can only be restored if you retrieve it again from your bank server.";
/* BankAccountSettingsDialog */

View File

@ -112,8 +112,8 @@
"Unsaved changes" = "Nicht gespeicherte Änderungen";
"Changed data hasn't been saved. Are you sure you want to discard them?" = "Es wurden nicht alle Änderungen gespeichert. Sind Sie sich sicher, dass Sie sie verwerfen möchten?";
"Delete account?" = "Konto löschen?";
"Really delete account '%@'? This cannot be undone and data will be lost." = "Möchten Sie das Konto '%@' wirklich löschen?\n\nDies kann nicht rückgängig gemacht werden und alle zu diesem Konto gespeicherten Daten gehen unwiederbringlich verloren.";
"Really delete account '%@'?" = "Möchten Sie das Konto '%@' wirklich löschen?";
"All data for this account will be permanently deleted locally." = "Alle Daten zu diesem Konto werden lokal vollständig gelöscht.\n\nZum Wiederhergestellen müssen sie vom Bankserver neu abgeholt werden.";
/* BankAccountSettingsDialog */

View File

@ -12,8 +12,8 @@ extension Message {
}
static func createAskUserToDeleteAccountMessage(_ bank: Customer, _ deleteAccount: @escaping (Customer) -> Void) -> Message {
return Message(title: Text("Delete account?"),
message: Text("Really delete account '\(bank.displayName)'? This cannot be undone and data will be lost."),
return Message(title: Text("Really delete account '\(bank.displayName)'?"),
message: Text("All data for this account will be permanently deleted locally."),
primaryButton: .destructive(Text("Delete"), action: { deleteAccount(bank) } ),
secondaryButton: .cancel())
}

View File

@ -49,8 +49,8 @@ struct BankListItem : View {
func askUserToDeleteAccount() {
// couldn't believe it, .alert() didn't work as SwiftUI resetted @State variable to dislpay it instantly, therefore Alert never got displayed
// TODO: use values from Message.createAskUserToDeleteAccountMessage(self.bank, self.deleteAccount)
let alert = UIAlertController(title: "Delete account?".localize(),
message: "Really delete account '%@'? This cannot be undone and data will be lost.".localize(bank.displayName),
let alert = UIAlertController(title: "Really delete account '%@'?".localize(bank.displayName),
message: "All data for this account will be permanently deleted locally.".localize(),
preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Delete".localize(), style: .destructive, handler: { _ in self.deleteAccount(self.bank) } ))