-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
Queue ListView incorrect shuffle representation. #1075
Comments
@hrkfdn I was trying to solve this problem but the way it would currently be solved is pretty messy. Most of the methods in I was wondering whether it would make more sense to combine the items and the order in the Maybe I'm over-complicating things, I have a habit of doing that. I just think it is a bit strange for the |
Totally agree. However, I'm not sure how simple a layer between FYI, I wanted to cut a release today, so I should probably revert the queue order display change. But we can merge it again once we have a solution for this. Hope that's ok. |
Yes I was maybe also going to suggest to revert it. For the implementation for Queue and ListView, I was thinking to keep the shared state using the Arc but put the new version of the 'orderable' Vec in there. Like that the updates would still be visible to both, but neither would have to be concerned with translating the explicit order. So the Queue and ListView would have an |
Seems like I once again forgot about the existence of |
NoteI might have over-complicated the solution or missed an obvious, correct way to solve this. I try my best 😝 Solution So FarI think I will give up on solving this issue for now. I've tried three methods to solve it and spent quite a bit of time but I find it very hard to correctly implement this in a way that doesn't require too much changes to the rest of the code or doesn't make it even harder for the next person to maintain and reason about. Here are the things I tried in case anyone else wants to have a go:
The big problem I'm having is that [1] roughly this with struct Queue {
queue: Vec<Playable>, // To know initial order
ordered: Arc<RwLock<Vec<Box<Playable>>>>, // Box for cheap in place sorting, especially with lots of Playables
...
} |
Describe the bug
ListView::get_indexes_of() doesn't take order into account, and disabling/enabling shuffle doesn't force an update of the search indexes.
See #465 for more info
To Reproduce
Steps to reproduce the behavior:
Search in queue view and shuffle and unshuffle.
Additional context
This is less detailed, I just put this issue to track this so I don't forget to solve this. I didn't think about this when adding the order feature (#1060, reverted), so I'll fix it 🙂
The text was updated successfully, but these errors were encountered: