Skip to content

Debug info: Sync interval "0 min" when actually -1 (manual) #905

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

Closed
sunkup opened this issue Jul 13, 2024 · 0 comments · Fixed by #928
Closed

Debug info: Sync interval "0 min" when actually -1 (manual) #905

sunkup opened this issue Jul 13, 2024 · 0 comments · Fixed by #928
Assignees
Labels
bug Something isn't working

Comments

@sunkup
Copy link
Member

sunkup commented Jul 13, 2024

The sync interval in the debug info is taken from AccountSettings and formatted like this:

accountSettings.getSyncInterval(info.authority)?.let {"${it/60} min"},

The value we get from the account settings (it) may sometimes be -1 (SYNC_INTERVAL_MANUALLY) and "${-1/60} min" then evaluates to "0 min". See an example here.

This is because in java and kotlin Integer division rounds towards zero.

We should fix that when generating the debug info.

Originally posted by @sunkup in https://github.com/bitfireAT/davx5/issues/581#issuecomment-2173312911

@sunkup sunkup added the bug Something isn't working label Jul 13, 2024
@ArnyminerZ ArnyminerZ linked a pull request Jul 20, 2024 that will close this issue
4 tasks
@ArnyminerZ ArnyminerZ moved this from Todo to In Review in DAVx⁵ Releases Jul 20, 2024
@github-project-automation github-project-automation bot moved this from In Review to Done in DAVx⁵ Releases Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants