-
-
Notifications
You must be signed in to change notification settings - Fork 78
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 sort order after file operations #2260
Conversation
* Add insert_sorted function to model * Add throttled resort function to model * Use appropriate model functions * Fix side effects on rename after new file creation
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.
This looks good to me. I will give it a test but feel free to merge anyway
Did some testing. I tried by editing the readme, closing, re-opening to edit, closing, etc. Usually worked but occasionally it would not sort. Not sure if a different issue is showing itself here or is related to this. Additionally the temp files don't disappear until I refresh with |
@zeebok Yes, I just noticed that myself. It works if you delete a file from the terminal but for some reason not if it is a backup file deleted by Code. Investigating.... |
Actually I am not sure that that issue is part of this PR since this is focused at resorting after adding/renaming a file. When a file is removed, the sort order does not change. I could probably fix the issue by resorting after deletion as well but not sure that is the most efficient way. I see whether there is a simpler way of getting the view to redraw after deletion first (it does after a terminal delete so ...) |
OK, so the problem is that the backup file is a hidden file and should not be visible anyway if "show-hidden" is off (and should not be added to the model). If "show-hidden" is on, then it gets removed as expected. |
Looks like this regression was introduced by https://github.com/elementary/files/pull/2200/files 😞 |
@zeebok I have added the fix for the issue you noticed to this PR to save time, as it is relatively small, but should strictly be a separate PR. Please let me know if you want it separated. |
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.
Well that seems to fix the issue I was seeing of the readme temp file being properly sorted with everything else. To me that fits this PR. I can open a separate issue for not seeing the .goutputstream files disappear even though they are deleted until some kind of view refresh.
The |
Fixes #2179
Fixes #2271
Fixes #2288
is_hidden
property construct-only and include files with~
suffix.