mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-17 02:33:27 +01:00
EMP: added back EMP entry/exit points as it was in 0.6.1 but with option to enable/disable it via settings
This commit is contained in:
@@ -14,6 +14,7 @@ import Intents
|
||||
import AltStoreCore
|
||||
import AltSign
|
||||
import Roxas
|
||||
import EmotionalDamage
|
||||
|
||||
import Nuke
|
||||
|
||||
@@ -98,7 +99,9 @@ final class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
self.prepareImageCache()
|
||||
|
||||
// TODO: @mahee96: find if we need to start em_proxy as in altstore?
|
||||
// start_em_proxy(bind_addr: Consts.Proxy.serverURL)
|
||||
if UserDefaults.standard.enableEMPforWireguard {
|
||||
start_em_proxy(bind_addr: Consts.Proxy.serverURL)
|
||||
}
|
||||
|
||||
SecureValueTransformer.register()
|
||||
|
||||
@@ -123,7 +126,9 @@ final class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
{
|
||||
// Make sure to update SceneDelegate.sceneDidEnterBackground() as well.
|
||||
// TODO: @mahee96: find if we need to stop em_proxy as in altstore?
|
||||
// stop_em_proxy()
|
||||
if UserDefaults.standard.enableEMPforWireguard {
|
||||
stop_em_proxy()
|
||||
}
|
||||
guard let oneMonthAgo = Calendar.current.date(byAdding: .month, value: -1, to: Date()) else { return }
|
||||
|
||||
let midnightOneMonthAgo = Calendar.current.startOfDay(for: oneMonthAgo)
|
||||
@@ -140,6 +145,9 @@ final class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
func applicationWillEnterForeground(_ application: UIApplication)
|
||||
{
|
||||
AppManager.shared.update()
|
||||
if UserDefaults.standard.enableEMPforWireguard {
|
||||
start_em_proxy(bind_addr: Consts.Proxy.serverURL)
|
||||
}
|
||||
|
||||
PatreonAPI.shared.refreshPatreonAccount()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user