diff --git a/OTP/KeyData.swift b/OTP/KeyData.swift index 2a7d26f..8db3666 100644 --- a/OTP/KeyData.swift +++ b/OTP/KeyData.swift @@ -54,8 +54,9 @@ struct KeyData: Codable { entries.removeAll(where: { $0.id == id }) } - mutating func clearEntries() { + mutating func reset() { entries.removeAll() + folders.removeAll() } mutating func addFolder() { diff --git a/OTP/KeyStore.swift b/OTP/KeyStore.swift index e10c553..e0e1ec1 100644 --- a/OTP/KeyStore.swift +++ b/OTP/KeyStore.swift @@ -66,8 +66,8 @@ class KeyStore: ObservableObject { data.removeKey(entryID: id) } - func clearEntries() { - data.clearEntries() + func reset() { + data.reset() } func addFolder() {