Repository navigation
gui: Disable Restore Versions filters when no versioned files exist (fixes #5408) #8539
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
calmh
merged 10 commits into
syncthing:main
from
tomasz1986:tomasz86/gui/restoreversions-disable-filters-when-no-versions
Mar 10, 2023
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
cd11413
gui: Disable Restore Versions filters when no versioned files exist (…
tomasz1986 4cdd3a4
wip
tomasz1986 4e2c885
refactor object empty checks
tomasz1986 3552ddb
use more descriptive names and simplify code
tomasz1986 39249a0
simplify checks
tomasz1986 ebbcd8b
space
tomasz1986 cf3f9a8
Merge branch 'main' into tomasz86/gui/restoreversions-disable-filters…
tomasz1986 db4b8f1
simplify code
tomasz1986 bbff205
don't run tree code at all if no versions
tomasz1986 ad8c007
strict equality
tomasz1986 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this exists for the time until fancytree is initialised, isn't it? What's the point of the conditional, instead of just always showing "loading data" until fancytree is ready?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question, and the code was remnants from the previous iteration, however I've now added yet another similar
sizeOfcheck in the controller, so that the tree code doesn't run at all when there are no versions. This way, the window loads faster, there is no 1970 year stuck in the disabled date filter, and the two conditionals are actually required again (because without the tree code running, the existing table isn't replaced with the tree table).I hope the explanation is clear… What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep makes sense. I don't think I'll remember/be able to figure it out if I ever stumble over this again though, but it wasn't any better before so 🤷