update selection after updating queue

This commit is contained in:
figsoda 2020-10-31 15:22:17 -04:00
parent 06db49324e
commit fbe05996fd

View file

@ -162,6 +162,7 @@ async fn run() -> Result<()> {
.context("Failed to draw to terminal")?, .context("Failed to draw to terminal")?,
Command::UpdateQueue(new_queue) => { Command::UpdateQueue(new_queue) => {
queue = new_queue; queue = new_queue;
selected = status.song.map_or(0, |song| song.pos);
tx.send(Command::UpdateFrame).await?; tx.send(Command::UpdateFrame).await?;
} }
Command::UpdateStatus(new_status) => { Command::UpdateStatus(new_status) => {