Skip to content

Commit

Permalink
Don't restart timer when entering the foreground
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnwalraven committed Oct 3, 2016
1 parent ae823d1 commit 0c592d7
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/ios/WebAppLocalServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ open class WebAppLocalServer: METPlugin, AssetBundleManagerDelegate {
NotificationCenter.default.addObserver(self, selector: #selector(WebAppLocalServer.pageDidLoad), name: NSNotification.Name.CDVPageDidLoad, object: webView)

NotificationCenter.default.addObserver(self, selector: #selector(WebAppLocalServer.applicationDidEnterBackground), name: NSNotification.Name.UIApplicationDidEnterBackground, object: nil)

NotificationCenter.default.addObserver(self, selector: #selector(WebAppLocalServer.applicationWillEnterForeground), name: NSNotification.Name.UIApplicationWillEnterForeground, object: nil)
}

func initializeAssetBundles() {
Expand Down Expand Up @@ -212,11 +210,6 @@ open class WebAppLocalServer: METPlugin, AssetBundleManagerDelegate {
// blacklisting a version just because the web view has been suspended
startupTimer?.stop()
}

func applicationWillEnterForeground() {
// Restart startup timer when entering the foreground again
startupTimer?.start(withTimeInterval: startupTimeoutInterval)
}

// MARK: - Public plugin commands

Expand Down

0 comments on commit 0c592d7

Please sign in to comment.