Free fork of NotProton: Windows Steam games in Mac Steam, on CodeWeavers' Wine and Apple's Game Porting Toolkit
Swift apple-silicond3dmetaldxmtdxvkgame-porting-toolkitgptkmac-gamingmacosmetalfxrosetta-2steamsteam-playwinewinecx
feat(status): Refresh also checks for a Bridgeplay update
raymondchins072d7dfe3625
diff --git a/app/Sources/BridgeplayApp/App.swift b/app/Sources/BridgeplayApp/App.swiftindex 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.sharedinit() {AppLog.start()diff --git a/app/Sources/BridgeplayApp/Support/AppUpdater.swift b/app/Sources/BridgeplayApp/Support/AppUpdater.swiftindex 0f1e87e..8c142fa 100644--- a/app/Sources/BridgeplayApp/Support/AppUpdater.swift+++ b/app/Sources/BridgeplayApp/Support/AppUpdater.swift@@ -3,6 +3,9 @@ import Sparkle@MainActorfinal class AppUpdater {+ // One updater for the app: the menu and the Status page's Refresh share it.+ static let shared = AppUpdater()+private let controller: SPUStandardUpdaterControllerinit() {@@ -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.swiftindex 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)}