Closed
Bug 1220301
Opened 9 years ago
Closed 9 years ago
Don't call beginTimedSyncs unless there's an account
Categories
(Firefox for iOS :: Sync, defect)
Tracking
()
RESOLVED
FIXED
2.0
People
(Reporter: rnewman, Assigned: Gavin, Mentored)
Details
(Whiteboard: [good first bug][lang=swift])
Attachments
(1 file)
Right now we set up the timer unconditionally:
func applicationDidBecomeActive() {
self.backgrounded = false
self.beginTimedSyncs()
}
and then we spam the log:
2015-10-30 14:06:26.024 [Warning] [Profile.swift:744] withSyncInputs(_:function:) > No account; can't sync.
2015-10-30 14:06:26.024 [Debug] [Profile.swift:805] syncOnTimer() > Timed history sync succeeded. Status: Not started: no account.
2015-10-30 14:21:26.053 [Debug] [Profile.swift:788] syncOnTimer() > Running timed logins sync.
2015-10-30 14:21:26.055 [Warning] [Profile.swift:744] withSyncInputs(_:function:) > No account; can't sync.
2015-10-30 14:21:26.055 [Debug] [Profile.swift:796] syncOnTimer() > Timed logins sync succeeded. Status: Not started: no account.
2015-10-30 14:21:26.056 [Debug] [Profile.swift:802] syncOnTimer() > Running timed history sync.
2015-10-30 14:21:26.056 [Warning] [Profile.swift:744] withSyncInputs(_:function:) > No account; can
Is it sufficient to put a
guard let _ = self.profile.account else { return }
before the beginTimedSyncs()?
Reporter | ||
Comment 2•9 years ago
|
||
I'd use
guard self.profile.hasAccount() else {
return
}
but yes, that's the idea!
Note that we also need to add a call to beginTimedSyncs in BrowserSyncManager.onAddedAccount -- we would no longer be automatically running a timer before you sign in, so we'd need to start one when the account is added.
Assignee | ||
Comment 3•9 years ago
|
||
Reporter | ||
Comment 4•9 years ago
|
||
Comment on attachment 8699155 [details] [review]
Link to Github pull-request: https://github.com/mozilla/firefox-ios/pull/1356
master: https://github.com/mozilla/firefox-ios/commit/5041de07e8e772accbb571a17216359b425e7578
Attachment #8699155 -
Flags: review?(rnewman) → review+
Reporter | ||
Updated•9 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.0
You need to log in
before you can comment on or make changes to this bug.
Description
•