You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
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
I went back to the working set sort and managed to merge both events workingSetReoder and workingSetSort into one workingSetSort and leaving almost the same functionality as before fixing #2076.
The reason will be displayed to describe this comment to others. Learn more.
The sortWorkingSet() function also calls $(exports).triggerHandler("workingSetSort") but the event does not seem to be handled anywhere. It should either be removed, or call triggerWorkingSetSort() directly.
The reason will be displayed to describe this comment to others. Learn more.
This function is used on the WorkingSetView.js#L249. It was initially used to save the working set state into the preferences, which isn't required so is now mainly used to disable the automatic sort and have both sort methods trigger 1 event.
I updated a bit the comment on the workingSetSort event and added a new workingSetDisableAutoSorting called every time 2 files are swapped when dragging and dropping them. This added a new event, but works better than before by not unnecessarily redrawing the working set after a drag/drop action. There might be a smarter way of figuring out when doing an automatic sort if it was previously resorted via a drag/drop action and avoid having the new event, but it is easier to do it like this.
Note: I've reopened #2076 for more discussion since this doesn't appear to address the main confusion/pitfall I was concerned about (and in some sense the event name change may have made it worse).
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
4 participants
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.
I went back to the working set sort and managed to merge both events
workingSetReoder
andworkingSetSort
into oneworkingSetSort
and leaving almost the same functionality as before fixing #2076.