Skip to content

Commit

Permalink
fix: Trigger sync call when app is launched from killed state #1718
Browse files Browse the repository at this point in the history
  • Loading branch information
priyonto committed Nov 21, 2023
1 parent 6cc7f56 commit fa5c452
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ class RuuviDaemonCloudSyncWorker: RuuviDaemonWorker, RuuviDaemonCloudSync {
start { [weak self] in
guard let sSelf = self else { return }
sSelf.pullTimer?.invalidate()
// Call the refreshImmediately method to execute it right away when
// thread is started.
sSelf.refreshImmediately()
let timer = Timer.scheduledTimer(
timeInterval: TimeInterval(sSelf.localSettings.networkPullIntervalSeconds),
target: sSelf,
Expand Down

0 comments on commit fa5c452

Please sign in to comment.