From bb76ac49a1fe8a83581e40db2044fcd0be076625 Mon Sep 17 00:00:00 2001 From: fmodf Date: Mon, 7 Oct 2024 18:16:00 +0200 Subject: [PATCH] wip --- .../View/Main/Settings/SettingsScreen.swift | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ConversationsClassic/View/Main/Settings/SettingsScreen.swift b/ConversationsClassic/View/Main/Settings/SettingsScreen.swift index 4d2362b..6f493e6 100644 --- a/ConversationsClassic/View/Main/Settings/SettingsScreen.swift +++ b/ConversationsClassic/View/Main/Settings/SettingsScreen.swift @@ -58,8 +58,16 @@ struct SettingsScreen: View { controlType: .none ) .onTapGesture { - clientsStore.flushAllData() - Database.shared.flushAllData() + router.showAlert( + .alert, + title: "Delete data", + subtitle: "Delete all data from the app?" + ) { + Button("Delete", role: .destructive) { + clientsStore.flushAllData() + Database.shared.flushAllData() + } + } } #endif }