diff options
| -rw-r--r-- | HoloBar/HoloBarApp.swift | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/HoloBar/HoloBarApp.swift b/HoloBar/HoloBarApp.swift index e8d678a..3fb0154 100644 --- a/HoloBar/HoloBarApp.swift +++ b/HoloBar/HoloBarApp.swift @@ -3,6 +3,7 @@ import SwiftUI @main struct HoloBarApp: App { @StateObject private var fetcher = CharacterFetcher() + @State private var showAvatars = false var body: some Scene { MenuBarExtra { @@ -15,9 +16,11 @@ struct HoloBarApp: App { NSWorkspace.shared.open(character.profileURL) }) { HStack { - AsyncImage(url: character.avatarURL, content: { $0 }, placeholder: { - Image(systemName: "person.crop.circle") - }) + if showAvatars { + AsyncImage(url: character.avatarURL, content: { $0 }, placeholder: { + Image(systemName: "person.crop.circle") + }) + } Text(character.name) } @@ -33,6 +36,10 @@ struct HoloBarApp: App { } #endif + Button("\(showAvatars ? "Hide" : "Show") Avatars") { + showAvatars.toggle() + } + Button("Refresh", action: refreshCharacters) Button("Quit", action: { NSApplication.shared.terminate(nil) }) } |