mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
Fix up this so it actually sets the value
This commit is contained in:
@@ -40,9 +40,9 @@ extension SettingsViewController
|
||||
static var allCases: [AppRefreshRow] {
|
||||
var c: [AppRefreshRow] = [.backgroundRefresh, .noIdleTimeout]
|
||||
let low: OperatingSystemVersion = .init(majorVersion: 14, minorVersion: 0, patchVersion: 0)
|
||||
let high: OperatingSystemVersion = .init(majorVersion: 18, minorVersion: 1, patchVersion: 0)
|
||||
let high: OperatingSystemVersion = .init(majorVersion: 18, minorVersion: 2, patchVersion: 0)
|
||||
let current = ProcessInfo.processInfo.operatingSystemVersion
|
||||
if low <= current, current < high {
|
||||
if UserDefaults.standard.isDebugModeEnabled, low <= current, current < high {
|
||||
c.append(.disableAppLimit)
|
||||
}
|
||||
guard #available(iOS 14, *) else { return c }
|
||||
@@ -328,6 +328,10 @@ private extension SettingsViewController
|
||||
self.present(alertController, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
@IBAction func toggleDisableAppLimit(_ sender: UISwitch) {
|
||||
UserDefaults.standard.isAppLimitDisabled = sender.isOn
|
||||
}
|
||||
|
||||
@IBAction func toggleIsBackgroundRefreshEnabled(_ sender: UISwitch)
|
||||
{
|
||||
UserDefaults.standard.isBackgroundRefreshEnabled = sender.isOn
|
||||
|
||||
Reference in New Issue
Block a user