Просмотр исходного кода

Don't make NS load immediately when app is opened from background. This fixes a small stutter delay

Jon Fawcett 6 лет назад
Родитель
Сommit
bd1c2a7f73
1 измененных файлов с 1 добавлено и 6 удалено
  1. 1 6
      LoopFollow/ViewControllers/MainViewController.swift

+ 1 - 6
LoopFollow/ViewControllers/MainViewController.swift

@@ -146,7 +146,7 @@ class MainViewController: UIViewController, UITableViewDataSource, ChartViewDele
         infoTable.dataSource = self
         
         // Load Data
-        appCameToForeground()
+        nightscoutLoader()
         
         
     }
@@ -155,9 +155,6 @@ class MainViewController: UIViewController, UITableViewDataSource, ChartViewDele
         // set screen lock
         UIApplication.shared.isIdleTimerDisabled = UserDefaultsRepository.screenlockSwitchState.value;
         
-        // Pull fresh data when view appears
-        // moved this to didload, timer end, and foreground
-        //nightscoutLoader()
     }
     
     
@@ -224,8 +221,6 @@ class MainViewController: UIViewController, UITableViewDataSource, ChartViewDele
             timer.invalidate()
         }
         startTimer(time: timeInterval)
-        nightscoutLoader()
-
     }
     
     // Check for new data when timer ends