diff options
| author | Fuwn <[email protected]> | 2025-02-12 23:25:10 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-02-12 23:25:10 -0800 |
| commit | ee6cc230c73a4bad1df711a0cd0352af7e4baced (patch) | |
| tree | ceb5f14e3d30292af7cc501039738874c5374b39 /HoloBar/CharacterFetcher.swift | |
| parent | feat(HoloBarApp): Add more avatar fallback levels (diff) | |
| download | holobar-ui.tar.xz holobar-ui.zip | |
feat: Add a UI windowui
Diffstat (limited to 'HoloBar/CharacterFetcher.swift')
| -rw-r--r-- | HoloBar/CharacterFetcher.swift | 9 |
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) + } + } } |