mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-20 04:03:26 +01:00
[DisableIdleTimeout]: Fix: moved setting isIdleTimerDisabled = false to AppManager.finish()
This commit is contained in:
@@ -1235,9 +1235,10 @@ private extension AppManager
|
|||||||
UIApplication.shared.isIdleTimerDisabled = UserDefaults.standard.isIdleTimeoutDisableEnabled
|
UIApplication.shared.isIdleTimerDisabled = UserDefaults.standard.isIdleTimeoutDisableEnabled
|
||||||
}
|
}
|
||||||
performAppOperations()
|
performAppOperations()
|
||||||
DispatchQueue.main.schedule {
|
// Moved to self.finish()
|
||||||
UIApplication.shared.isIdleTimerDisabled = false
|
// DispatchQueue.main.schedule {
|
||||||
}
|
// UIApplication.shared.isIdleTimerDisabled = false
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
return group
|
return group
|
||||||
@@ -2098,6 +2099,11 @@ private extension AppManager
|
|||||||
|
|
||||||
func finish(_ operation: AppOperation, result: Result<InstalledApp, Error>, group: RefreshGroup, progress: Progress?)
|
func finish(_ operation: AppOperation, result: Result<InstalledApp, Error>, group: RefreshGroup, progress: Progress?)
|
||||||
{
|
{
|
||||||
|
// remove disableIdleTimeout
|
||||||
|
DispatchQueue.main.schedule {
|
||||||
|
UIApplication.shared.isIdleTimerDisabled = false
|
||||||
|
}
|
||||||
|
|
||||||
// Must remove before saving installedApp.
|
// Must remove before saving installedApp.
|
||||||
if let currentProgress = self.progress(for: operation), currentProgress == progress
|
if let currentProgress = self.progress(for: operation), currentProgress == progress
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user