Skip to content

fix: remove accumulated polling when app comes back to foreground #301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Mar 11, 2020

Conversation

jaeopt
Copy link
Contributor

@jaeopt jaeopt commented Mar 2, 2020

  • When app goes to background, polling stops OK as expected.
  • But when app comes back to foreground, the current implementation looks at the timer behind and try to poll multiple times, which is annoying. This fix cleans up this logic, so recover normal periodic polling regardless of delayed timer value.

@@ -159,19 +159,6 @@ class DefaultDatafileHandler: OPTDatafileHandler {
}
}

@objc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was this removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not used anywhere. probably leftover from previous changes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftover from ios 9 support. got it. :)

@coveralls
Copy link

coveralls commented Mar 4, 2020

Coverage Status

Coverage increased (+0.03%) to 98.866% when pulling ebfd13c on jae/many-polling into cd214de on master.

Copy link
Contributor

@thomaszurkan-optimizely thomaszurkan-optimizely left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@thomaszurkan-optimizely thomaszurkan-optimizely left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jaeopt jaeopt merged commit 55484cc into master Mar 11, 2020
@jaeopt jaeopt deleted the jae/many-polling branch March 11, 2020 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants