From 26512b7318c10ce337ad4b428655a17a7747b2b9 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Tue, 24 Aug 2021 22:51:14 -0400 Subject: [PATCH] clearEntries -> reset --- OTP/KeyData.swift | 3 ++- OTP/KeyStore.swift | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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() {