commit cd62418dda2c740cfc36d0d9db760dd48e830cc1 parent ba32d15a494987bea6c24a0fbfb5bfba8ae26955 Author: OlegAba <mail@olegaba.com> Date: Thu, 5 Jan 2023 17:47:58 -0500 Add clear image cache button in settings Closes: #260 Changelog-Added: Added clear cache button to wipe pfp/image cache Diffstat:
M | damus/Views/ConfigView.swift | | | 9 | +++++++++ |
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/damus/Views/ConfigView.swift b/damus/Views/ConfigView.swift @@ -6,6 +6,7 @@ // import AVFoundation import SwiftUI +import Kingfisher struct ConfigView: View { let state: DamusState @@ -113,6 +114,14 @@ struct ConfigView: View { } } + Section("Clear Cache") { + Button("Clear") { + KingfisherManager.shared.cache.clearMemoryCache() + KingfisherManager.shared.cache.clearDiskCache() + KingfisherManager.shared.cache.cleanExpiredDiskCache() + } + } + Section("Reset") { Button("Logout") { confirm_logout = true