Skip to content
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

Fix version check #1585

Merged

Conversation

bemusementpark
Copy link

@bemusementpark bemusementpark commented Jul 31, 2024

  1. Schedule the fetch 4 hours after last check if it was within 4 hours, instead of just 4 hours from now.

  2. Renamed versionUtil to VersionDataFetcher

  • It has state, so it's not a Util
  • It fetches VersionData
  1. Fixed an issue where we would never start checking after creating or loading an account (until we background and foreground the app again, at least)

3. Fixed the timing issue where if we checked 1 second before the last check had expired, we would wait another 4 hours, meaning we would call up to 8 hours since the last call.

  1. Removed job?.cancel() as the Job was not cancellable, so achieved nothing, but looked like it was doing something, which was potentially misleading.

  2. call stopTimedVersionCheck() at the start of startTimedVersionCheck() to prevent any duplicates being posted.

  3. Utilise delayTimeMillis < 0 { post immediately } in Handler.postDelayed for simplified code.

  • We no longer need to check at the start of fetchVersionData as it's always scheduled at the correct time.
  • We no longer need to fetch and schedule, as we schedule to now if appropriate.
  1. @Inject it.

@ThomasSession ThomasSession merged commit 0616e14 into oxen-io:release/1.19.0 Aug 1, 2024
1 check passed
@bemusementpark bemusementpark deleted the fix-version-check branch August 2, 2024 00:52
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