diff options
| author | Fuwn <[email protected]> | 2025-06-12 05:22:30 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-06-12 05:22:30 -0700 |
| commit | c5d9104a80ca9a29967002e9fb8eb4d4e34422c6 (patch) | |
| tree | 6c999943cadb7b0866c016a775388e348a89b271 | |
| parent | feat: Development commit (diff) | |
| download | sora-testing-c5d9104a80ca9a29967002e9fb8eb4d4e34422c6.tar.xz sora-testing-c5d9104a80ca9a29967002e9fb8eb4d4e34422c6.zip | |
feat: Development commit
| -rw-r--r-- | Sora/Data/Booru/BooruManager.swift | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Sora/Data/Booru/BooruManager.swift b/Sora/Data/Booru/BooruManager.swift index b3fb031..ae49b6b 100644 --- a/Sora/Data/Booru/BooruManager.swift +++ b/Sora/Data/Booru/BooruManager.swift @@ -209,7 +209,18 @@ class BooruManager: ObservableObject { } } - // MARK: - Private Helpers + func updateTagsCacheSize() { + cacheSize = tagsCacheFileURL.flatMap { url in + ByteCountFormatter.string( + fromByteCount: Int64( + (try? FileManager.default.attributesOfItem(atPath: url.path)[.size] as? Int) ?? 0 + ), + countStyle: .file + ) + } + } + + // MARK: - Private Methods private func urlForPosts(page: Int, limit: Int, tags: [String]) -> URL? { let tagString = tags.joined(separator: "+") @@ -305,17 +316,6 @@ class BooruManager: ObservableObject { currentTask = nil } - func updateTagsCacheSize() { - cacheSize = tagsCacheFileURL.flatMap { url in - ByteCountFormatter.string( - fromByteCount: Int64( - (try? FileManager.default.attributesOfItem(atPath: url.path)[.size] as? Int) ?? 0 - ), - countStyle: .file - ) - } - } - // MARK: - Deinitialisation deinit { currentTask?.cancel() } } |