psst
psst copied to clipboard
Queue widget rebase
Ok, so I merged main into the queue for this now. I will close the other PR. The issues still persist. I had an idea, which is where we parse whether or not it is from the user-added queue or not, to the core through the item ID like this:
pub struct ItemId {
pub id: u128,
pub id_type: ItemIdType,
pub from_added_queue: bool,
}
I have tried to implement it, but I get strange issues where sometimes it just glitches out and doesn't let you play anything unless you have something queued. Could you help out @jacksongoode ? That should make it so I can finish this off!
Edit: We want to target this section which tells psst where the item comes from.
pub fn queued_entry(&self, item_id: ItemId) -> Option<QueueEntry> {
if let Some(queued) = self
.added_queue
.iter()
.find(|queued| queued.item.id() == item_id)
.cloned()
{
Some(queued)
} else if let Some(queued) = self
.playback
.queue
.iter()
.find(|queued| queued.item.id() == item_id)
.cloned()
{
return Some(queued);
} else {
None
}
}
...