mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
add a reset core data option in manage account menu
This commit is contained in:
parent
b60fb42606
commit
8c1d012128
2 changed files with 7 additions and 1 deletions
|
|
@ -37,6 +37,12 @@ struct ManageAccountView: View {
|
|||
},
|
||||
label: { Text("Delete Account") }
|
||||
)
|
||||
Button(
|
||||
action: {
|
||||
dataService.resetCoreData()
|
||||
},
|
||||
label: { Text("Reset Data Cache") }
|
||||
)
|
||||
.alert(isPresented: $showDeleteAccountConfirmation) {
|
||||
Alert(
|
||||
title: Text("Are you sure you want to delete your account? This action can't be undone."),
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ public final class DataService: ObservableObject {
|
|||
}
|
||||
}
|
||||
|
||||
func resetCoreData() {
|
||||
public func resetCoreData() {
|
||||
UserDefaults.standard.set(
|
||||
DateFormatter.formatterISO8601.string(from: Date(timeIntervalSinceReferenceDate: 0)),
|
||||
forKey: UserDefaultKey.lastItemSyncTime.rawValue
|
||||
|
|
|
|||
Loading…
Reference in a new issue