mirror of
https://github.com/cranci1/Sora.git
synced 2026-01-11 20:10:24 +00:00
test Jetsam dont kill sulfur please 😭
This commit is contained in:
parent
a0c7bbf734
commit
53ae9b2d23
3 changed files with 6 additions and 5 deletions
|
|
@ -14,7 +14,7 @@ class KingfisherCacheManager {
|
|||
private let jpegCompressionQuality: CGFloat = 0.7
|
||||
|
||||
static let shared = KingfisherCacheManager()
|
||||
private let maxDiskCacheSize: UInt = 64 * 1024 * 1024
|
||||
private let maxDiskCacheSize: UInt = 16 * 1024 * 1024
|
||||
private let maxCacheAgeInDays: TimeInterval = 7
|
||||
|
||||
private let imageCachingEnabledKey = "imageCachingEnabled"
|
||||
|
|
@ -39,7 +39,9 @@ class KingfisherCacheManager {
|
|||
|
||||
@objc private func clearMemoryCacheOnWarning() {
|
||||
KingfisherManager.shared.cache.clearMemoryCache()
|
||||
Logger.shared.log("Cleared memory cache due to memory warning", type: "Debug")
|
||||
KingfisherManager.shared.cache.clearDiskCache {
|
||||
Logger.shared.log("Cleared memory and disk cache due to memory warning", type: "Debug")
|
||||
}
|
||||
}
|
||||
|
||||
func configureKingfisher() {
|
||||
|
|
@ -50,7 +52,7 @@ class KingfisherCacheManager {
|
|||
.days(Int(maxCacheAgeInDays)) : .seconds(1)
|
||||
|
||||
cache.memoryStorage.config.totalCostLimit = isCachingEnabled ?
|
||||
12 * 1024 * 1024 : 0
|
||||
4 * 1024 * 1024 : 0
|
||||
|
||||
cache.memoryStorage.config.cleanInterval = 60
|
||||
|
||||
|
|
|
|||
|
|
@ -270,7 +270,6 @@ struct EpisodeCell: View {
|
|||
.onFailure { error in
|
||||
Logger.shared.log("Failed to load episode image: \(error)", type: "Error")
|
||||
}
|
||||
.cacheMemoryOnly(!KingfisherCacheManager.shared.isCachingEnabled)
|
||||
.resizable()
|
||||
.aspectRatio(16/9, contentMode: .fill)
|
||||
.frame(width: 100, height: 56)
|
||||
|
|
|
|||
|
|
@ -616,7 +616,7 @@ struct MediaInfoView: View {
|
|||
.frame(width: max(width * CGFloat(progress), 8), height: 48)
|
||||
.mask(
|
||||
HStack {
|
||||
if progress < 0.05 {
|
||||
if progress < 0.05 && progress != 0 {
|
||||
RoundedRectangle(cornerRadius: 24)
|
||||
.frame(width: 8)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue