Skip to content

Commit

Permalink
feat: add setting to clear history
Browse files Browse the repository at this point in the history
  • Loading branch information
castdrian committed Dec 30, 2023
1 parent cf13b20 commit a499987
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ishare/Views/SettingsMenuView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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")
Expand Down

0 comments on commit a499987

Please sign in to comment.