aboutsummaryrefslogtreecommitdiff
path: root/HoloBar/CharacterFetcher.swift
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-02-12 23:25:10 -0800
committerFuwn <[email protected]>2025-02-12 23:25:10 -0800
commitee6cc230c73a4bad1df711a0cd0352af7e4baced (patch)
treeceb5f14e3d30292af7cc501039738874c5374b39 /HoloBar/CharacterFetcher.swift
parentfeat(HoloBarApp): Add more avatar fallback levels (diff)
downloadholobar-ui.tar.xz
holobar-ui.zip
feat: Add a UI windowui
Diffstat (limited to 'HoloBar/CharacterFetcher.swift')
-rw-r--r--HoloBar/CharacterFetcher.swift9
1 files changed, 9 insertions, 0 deletions
diff --git a/HoloBar/CharacterFetcher.swift b/HoloBar/CharacterFetcher.swift
index 7ba6854..c9d5a9b 100644
--- a/HoloBar/CharacterFetcher.swift
+++ b/HoloBar/CharacterFetcher.swift
@@ -122,4 +122,13 @@ class CharacterFetcher: ObservableObject {
self.characters = updatedCharacters
}
}
+
+ func refreshCharactersForToday() {
+ let today = Calendar.current.dateComponents([.month, .day], from: Date())
+
+ if let month = today.month, let day = today.day {
+ characters.removeAll()
+ fetchCharacters(for: month, day: day)
+ }
+ }
}