Skip to content

Free fork of NotProton: Windows Steam games in Mac Steam, on CodeWeavers' Wine and Apple's Game Porting Toolkit

feat(status): Refresh also checks for a Bridgeplay update

raymondchins072d7dfe3625
diff --git a/app/Sources/BridgeplayApp/App.swift b/app/Sources/BridgeplayApp/App.swift
index 47edd7e..124eced 100644
--- a/app/Sources/BridgeplayApp/App.swift
+++ b/app/Sources/BridgeplayApp/App.swift
@@ -8,7 +8,7 @@ struct BridgeplayApp: App {
@State private var prefixes = PrefixesModel()
@State private var pane: Pane = .status
@State private var showsSetup = false
- private let updater = AppUpdater()
+ private let updater = AppUpdater.shared
init() {
AppLog.start()
diff --git a/app/Sources/BridgeplayApp/Support/AppUpdater.swift b/app/Sources/BridgeplayApp/Support/AppUpdater.swift
index 0f1e87e..8c142fa 100644
--- a/app/Sources/BridgeplayApp/Support/AppUpdater.swift
+++ b/app/Sources/BridgeplayApp/Support/AppUpdater.swift
@@ -3,6 +3,9 @@ import Sparkle
@MainActor
final class AppUpdater {
+ // One updater for the app: the menu and the Status page's Refresh share it.
+ static let shared = AppUpdater()
+
private let controller: SPUStandardUpdaterController
init() {
@@ -23,4 +26,5 @@ final class AppUpdater {
controller.checkForUpdates(nil)
#endif
}
+
}
diff --git a/app/Sources/BridgeplayApp/Views/StatusView.swift b/app/Sources/BridgeplayApp/Views/StatusView.swift
index 58726f7..f362d2e 100644
--- a/app/Sources/BridgeplayApp/Views/StatusView.swift
+++ b/app/Sources/BridgeplayApp/Views/StatusView.swift
@@ -427,8 +427,10 @@ struct StatusView: View {
private var refreshButton: some View {
Button("Refresh", systemImage: "arrow.clockwise") {
+ AppUpdater.shared.check()
Task { await status.refresh() }
}
+ .help(String(localized: "Check this Mac's setup again and look for a Bridgeplay update"))
.disabled(!status.isIdle)
}