Skip to content

Commit

Permalink
Minor fix for path and update channel switching
Browse files Browse the repository at this point in the history
  • Loading branch information
Moonif committed Feb 10, 2024
1 parent 572784f commit 0585fd7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions MacBox/ViewControllers/MainViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ class MainViewController: NSViewController {
}

// Check if 86Box is installed, and check for updated version
func checkFor86Box(url: URL? = nil, appVer: String? = nil, buildVer: String? = nil) {
func checkFor86Box(url: URL? = nil, appVer: String? = nil, buildVer: String? = nil, ignoreVersionCheck: Bool = false) {
var localUrl: URL?

if let url = url {
Expand Down Expand Up @@ -288,7 +288,7 @@ class MainViewController: NSViewController {
localUrl = versionInfoObject.emulatorCustomUrl
}

if let localUrl = localUrl {
if let localUrl = localUrl, !ignoreVersionCheck {
// Get 86Box info.plist
if let bundle = Bundle(url: localUrl) {
// Get the 86Box short version
Expand Down
6 changes: 3 additions & 3 deletions MacBox/ViewControllers/SettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class SettingsViewController: NSViewController {
setEmulatorPathTextField(text: emulatorCustomPathString ?? "-")
// Update version status in MainVC
MainViewController.instance.versionInfoObject.emulatorCustomUrl = appURL
MainViewController.instance.checkFor86Box()
MainViewController.instance.checkFor86Box(url: nil, appVer: nil, buildVer: nil, ignoreVersionCheck: true)
}
else {
// Not 86Box; Reset selection
Expand All @@ -148,7 +148,7 @@ class SettingsViewController: NSViewController {
emulatorCustomPathString = nil
// Update version status in MainVC
MainViewController.instance.versionInfoObject.emulatorCustomUrl = nil
MainViewController.instance.checkFor86Box()
MainViewController.instance.checkFor86Box(url: nil, appVer: nil, buildVer: nil, ignoreVersionCheck: true)
}
}
}
Expand All @@ -169,7 +169,7 @@ class SettingsViewController: NSViewController {

// Update version status in MainVC
MainViewController.instance.versionInfoObject.emulatorUpdateChannel = updateChannelStr
MainViewController.instance.checkFor86Box()
MainViewController.instance.checkFor86Box(url: nil, appVer: nil, buildVer: nil, ignoreVersionCheck: true)
}
}
}

0 comments on commit 0585fd7

Please sign in to comment.