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

Sync interval #1310

Closed
1 task
kalekad opened this issue Jan 1, 2023 · 6 comments
Closed
1 task

Sync interval #1310

kalekad opened this issue Jan 1, 2023 · 6 comments
Labels

Comments

@kalekad
Copy link

kalekad commented Jan 1, 2023

Which version of floccus are you using?

v4.18.0

Sync method

WebDAV

Which browser are you using? In case you are using the phone App, specify the Android or iOS version and device please.

Tor Browser 12.0.1(Firefox 102.6esr), Android

Which version of Nextcloud Bookmarks are you using? (if relevant)

No response

Which version of Nextcloud? (if relevant)

No response

What kind of WebDAV server are you using? (if relevant)

No response

Describe the Bug

I set the sync interval to 5 minutes and save. I reopen the settings and the sync interval is at 15 minutes.

Expected Behavior

A sync interval of 5 minutes remains stored.

To Reproduce

Debug log provided

  • I have provided a debug log file
@marcelklehr
Copy link
Member

It seems only 5minutes was forbidden due to a legacy rule. Fixed now.

@kalekad
Copy link
Author

kalekad commented Jan 14, 2023

In v4.18.1 the color of the indicator changed from red to blue when selecting a 5 min interval, but it still does not save.

@marcelklehr marcelklehr reopened this Jan 15, 2023
@marcelklehr
Copy link
Member

Confirmed. Weird. I tested this before the release and it was working :/

@kolinger
Copy link

kolinger commented Nov 27, 2023

Last fix removed one part of condition but identical condition was left few lines bellow:

watch: {
value() {
this.syncIntervalStep = this.syncIntervalSteps.reduce((closestIndex, value, index) => {
const currentDelta = Math.abs(this.syncIntervalSteps[closestIndex] - this.value)
const newDelta = Math.abs(value - this.value)
if (currentDelta > newDelta) return index
else return closestIndex
}, 0) || this.syncIntervalSteps.indexOf(15)
},
syncIntervalStep(step) {
this.$emit('input', this.syncIntervalSteps[step])
},
},

Where zero index is taken as invalid value and overridden by default 15 minute interval. But zero index is first option of interval and that's 5 minutes, thus 5 minutes is always overridden by 15 minutes.

This is why 5 minute interval still can't be saved with 4.19.1 as #1414 reports and thus this issues wasn't fixed yet.

@marcelklehr
Copy link
Member

Thank you @kolinger for investigating this!

@marcelklehr marcelklehr moved this to Done in Floccus May 19, 2024
Copy link

github-actions bot commented Dec 6, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Status: Done
Development

No branches or pull requests

3 participants