Add a few more checks for app limits

This commit is contained in:
ny
2024-10-11 02:50:48 -04:00
parent 2a9f88c810
commit 59896e4f89
2 changed files with 2 additions and 1 deletions

View File

@@ -1017,7 +1017,7 @@ private extension AppManager
func removeAppExtensions(from application: ALTApplication, extensions: Set<ALTApplication>, _ presentingViewController: UIViewController, completion: @escaping (Result<Void, Error>) -> Void)
{
guard !application.appExtensions.isEmpty else { return completion(.success(())) }
guard !application.appExtensions.isEmpty, !UserDefaults.standard.isAppLimitDisabled else { return completion(.success(())) }
let firstSentence: String

View File

@@ -331,6 +331,7 @@ private extension SettingsViewController
@IBAction func toggleDisableAppLimit(_ sender: UISwitch) {
UserDefaults.standard.isAppLimitDisabled = sender.isOn
UserDefaults.standard.activeAppsLimit = sender.isOn ? Int.max : ALTActiveAppsLimit
UserDefaults.standard.activeAppLimitIncludesExtensions = !sender.isOn
}
@IBAction func toggleIsBackgroundRefreshEnabled(_ sender: UISwitch)