mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-19 03:33:36 +01:00
Fix going to the home screen
This commit is contained in:
committed by
nythepegasus
parent
d61c54fa60
commit
9ae49977fb
@@ -169,12 +169,9 @@ final class InstallAppOperation: ResultOperation<InstalledApp>
|
|||||||
|
|
||||||
let content = UNMutableNotificationContent()
|
let content = UNMutableNotificationContent()
|
||||||
content.title = "Refreshing..."
|
content.title = "Refreshing..."
|
||||||
content.body = "To finish refreshing, SideStore must be moved to the background, which it does by going to the home screen. Please reopen SideStore after it is done refreshing!"
|
content.body = "To finish refreshing SideStore must go to the home screen. Please reopen after!"
|
||||||
let notification = UNNotificationRequest(identifier: Bundle.Info.appbundleIdentifier + ".FinishRefreshNotification", content: content, trigger: UNTimeIntervalNotificationTrigger(timeInterval: 2, repeats: false))
|
let notification = UNNotificationRequest(identifier: Bundle.Info.appbundleIdentifier + ".FinishRefreshNotification", content: content, trigger: UNTimeIntervalNotificationTrigger(timeInterval: 2, repeats: false))
|
||||||
UNUserNotificationCenter.current().add(notification)
|
UNUserNotificationCenter.current().add(notification)
|
||||||
|
|
||||||
UIApplication.shared.perform(#selector(NSXPCConnection.suspend))
|
|
||||||
|
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
print("Notifications are not enabled")
|
print("Notifications are not enabled")
|
||||||
@@ -194,11 +191,11 @@ final class InstallAppOperation: ResultOperation<InstalledApp>
|
|||||||
topController.present(alert, animated: true)
|
topController.present(alert, animated: true)
|
||||||
} else {
|
} else {
|
||||||
print("No key window? Let's just go home")
|
print("No key window? Let's just go home")
|
||||||
UIApplication.shared.perform(#selector(NSXPCConnection.suspend))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
UIApplication.shared.perform(#selector(NSXPCConnection.suspend))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var attempts = 10
|
var attempts = 10
|
||||||
|
|||||||
Reference in New Issue
Block a user