actually update selection after updating queue

This commit is contained in:
figsoda 2020-10-31 15:26:19 -04:00
parent fbe05996fd
commit 7f7d7cd422

View file

@ -163,6 +163,8 @@ async fn run() -> Result<()> {
Command::UpdateQueue(new_queue) => { Command::UpdateQueue(new_queue) => {
queue = new_queue; queue = new_queue;
selected = status.song.map_or(0, |song| song.pos); selected = status.song.map_or(0, |song| song.pos);
liststate = ListState::default();
liststate.select(Some(selected));
tx.send(Command::UpdateFrame).await?; tx.send(Command::UpdateFrame).await?;
} }
Command::UpdateStatus(new_status) => { Command::UpdateStatus(new_status) => {