Add clear image cache button in settings
Closes: #260 Changelog-Added: Added clear cache button to wipe pfp/image cache
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
//
|
//
|
||||||
import AVFoundation
|
import AVFoundation
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
import Kingfisher
|
||||||
|
|
||||||
struct ConfigView: View {
|
struct ConfigView: View {
|
||||||
let state: DamusState
|
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") {
|
Section("Reset") {
|
||||||
Button("Logout") {
|
Button("Logout") {
|
||||||
confirm_logout = true
|
confirm_logout = true
|
||||||
|
|||||||
Reference in New Issue
Block a user