summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-06-12 05:22:30 -0700
committerFuwn <[email protected]>2025-06-12 05:22:30 -0700
commitc5d9104a80ca9a29967002e9fb8eb4d4e34422c6 (patch)
tree6c999943cadb7b0866c016a775388e348a89b271
parentfeat: Development commit (diff)
downloadsora-testing-c5d9104a80ca9a29967002e9fb8eb4d4e34422c6.tar.xz
sora-testing-c5d9104a80ca9a29967002e9fb8eb4d4e34422c6.zip
feat: Development commit
-rw-r--r--Sora/Data/Booru/BooruManager.swift24
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() }
}