From a4999878c252e914508bdd9b60569b698fd3a33e Mon Sep 17 00:00:00 2001 From: castdrian Date: Sat, 30 Dec 2023 13:27:32 +0100 Subject: [PATCH] feat: add setting to clear history --- ishare/Views/SettingsMenuView.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ishare/Views/SettingsMenuView.swift b/ishare/Views/SettingsMenuView.swift index 0fa0f62..cf640f6 100644 --- a/ishare/Views/SettingsMenuView.swift +++ b/ishare/Views/SettingsMenuView.swift @@ -61,6 +61,7 @@ struct GeneralSettingsView: View { @Default(.menuBarIcon) var menubarIcon @Default(.toastTimeout) var toastTimeout @Default(.aussieMode) var aussieMode + @Default(.uploadHistory) var uploadHistory var body: some View { VStack { @@ -78,12 +79,16 @@ struct GeneralSettingsView: View { } }.padding().frame(width: 200) HStack { - Button("Export settings") { + Button("Export Settings") { exportUserDefaults() } - Button("Import settings") { + Button("Import Settings") { importUserDefaults() } + Button("Clear History") { + uploadHistory = [] + BezelNotification.show(messageText: "Cleared history", icon: ToastIcon) + } } VStack { Text("Toast Timeout: \(Int(toastTimeout)) seconds")