Browse Source

Add clear image cache button in settings

Closes: #260
Changelog-Added: Added clear cache button to wipe pfp/image cache
translations_damus-localizations-en-us-xcloc-localized-contents-en-us-xliff--master_es_419
OlegAba 2 years ago
committed by William Casarin
parent
commit
cd62418dda
  1. 9
      damus/Views/ConfigView.swift

9
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

Loading…
Cancel
Save