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

Improvements to folders tree (v2) #1787

Merged
merged 6 commits into from
Aug 15, 2024
Merged

Conversation

barijaona
Copy link
Member

Replaces #1783, should help with issues #1768, #1779 and #1784.

I decided to revert PR #1754 (Improve handling of FoldersTree manual sort issues) and implement a better handling of siblings reported as missing in -loadTree:rootNode:

As in #1783, check -setParent:forFolder: and -setNextSibling:folderFromID:forFolder: success or failure before moving a tree node.

@barijaona barijaona requested a review from Eitot August 6, 2024 02:32
Don't proceed to folder move if Database's -setParent:forFolder: or
-setNextSibling:folderFromID:forFolder: return NO.
Adapt accordingly the insertion into undoArray.
Remove extraneous spaces while keeping the tab based spacing
in order to preserve the legibility of git history.
Other slight changes to improve legibility.
I experienced that the recovery procedure led to an incoherent tree,
so the best workaround remains switching back to alphabetical auto sort
by reverting commit e3751a9. However, reselect user's choice after that.

As mail exchanges with user @liamgreenwood around issue ViennaRSS#1768 hinted
that "loss" of a sibling is the likely origin of -loadTree:rootNode's
failure, try to find it and reattach it as soon as it is reported missing.
@barijaona barijaona force-pushed the foldersTree branch 2 times, most recently from 5412d2e to a4c8c8f Compare August 7, 2024 15:34
@barijaona barijaona merged commit 8a6e813 into ViennaRSS:master Aug 15, 2024
2 checks passed
@barijaona barijaona deleted the foldersTree branch August 15, 2024 18:04
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.

1 participant