From c3847276f7457bafd83c897e64483b416873a284 Mon Sep 17 00:00:00 2001 From: Magesh K <47920326+mahee96@users.noreply.github.com> Date: Sun, 2 Feb 2025 04:18:36 +0530 Subject: [PATCH] [DisableIdleTimeout]: Fix: moved setting isIdleTimerDisabled = false to AppManager.finish() --- AltStore/Managing Apps/AppManager.swift | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/AltStore/Managing Apps/AppManager.swift b/AltStore/Managing Apps/AppManager.swift index 61c85870..13a5927f 100644 --- a/AltStore/Managing Apps/AppManager.swift +++ b/AltStore/Managing Apps/AppManager.swift @@ -1235,9 +1235,10 @@ private extension AppManager UIApplication.shared.isIdleTimerDisabled = UserDefaults.standard.isIdleTimeoutDisableEnabled } performAppOperations() - DispatchQueue.main.schedule { - UIApplication.shared.isIdleTimerDisabled = false - } + // Moved to self.finish() +// DispatchQueue.main.schedule { +// UIApplication.shared.isIdleTimerDisabled = false +// } } return group @@ -2098,6 +2099,11 @@ private extension AppManager func finish(_ operation: AppOperation, result: Result, group: RefreshGroup, progress: Progress?) { + // remove disableIdleTimeout + DispatchQueue.main.schedule { + UIApplication.shared.isIdleTimerDisabled = false + } + // Must remove before saving installedApp. if let currentProgress = self.progress(for: operation), currentProgress == progress {