aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Hotline/macOS/HotlinePanelView.swift25
1 files changed, 11 insertions, 14 deletions
diff --git a/Hotline/macOS/HotlinePanelView.swift b/Hotline/macOS/HotlinePanelView.swift
index 991946e..a368459 100644
--- a/Hotline/macOS/HotlinePanelView.swift
+++ b/Hotline/macOS/HotlinePanelView.swift
@@ -61,21 +61,18 @@ struct HotlinePanelView: View {
.disabled(ApplicationState.shared.activeServerState == nil)
.help("Message Board")
- if let activeHotline = ApplicationState.shared.activeHotline,
- activeHotline.serverVersion >= 151 {
- Button {
- ApplicationState.shared.activeServerState?.selection = .news
- }
- label: {
- Image("Section News")
- .resizable()
- .scaledToFit()
- }
- .buttonStyle(.plain)
- .frame(width: 20, height: 20)
- .disabled(ApplicationState.shared.activeServerState == nil)
- .help("News")
+ Button {
+ ApplicationState.shared.activeServerState?.selection = .news
+ }
+ label: {
+ Image("Section News")
+ .resizable()
+ .scaledToFit()
}
+ .buttonStyle(.plain)
+ .frame(width: 20, height: 20)
+ .disabled(ApplicationState.shared.activeServerState == nil || (ApplicationState.shared.activeHotline?.serverVersion ?? 0) < 151)
+ .help("News")
Button {
ApplicationState.shared.activeServerState?.selection = .files