mirror of
https://github.com/figsoda/mmtc
synced 2024-11-22 15:13:03 +00:00
clean up
This commit is contained in:
parent
25d4812d6f
commit
ed20688e1b
2 changed files with 3 additions and 5 deletions
|
@ -18,7 +18,6 @@ pub fn render(
|
||||||
widget: &Widget,
|
widget: &Widget,
|
||||||
queue: &[Track],
|
queue: &[Track],
|
||||||
status: &Status,
|
status: &Status,
|
||||||
selected: usize,
|
|
||||||
liststate: &mut ListState,
|
liststate: &mut ListState,
|
||||||
) {
|
) {
|
||||||
match widget {
|
match widget {
|
||||||
|
@ -54,7 +53,7 @@ pub fn render(
|
||||||
let mut ws = ws.into_iter();
|
let mut ws = ws.into_iter();
|
||||||
|
|
||||||
while let (Some(chunk), Some(w)) = (chunks.next(), ws.next()) {
|
while let (Some(chunk), Some(w)) = (chunks.next(), ws.next()) {
|
||||||
render(frame, chunk, w, queue, status, selected, liststate);
|
render(frame, chunk, w, queue, status, liststate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Widget::Columns(xs) => {
|
Widget::Columns(xs) => {
|
||||||
|
@ -89,7 +88,7 @@ pub fn render(
|
||||||
let mut ws = ws.into_iter();
|
let mut ws = ws.into_iter();
|
||||||
|
|
||||||
while let (Some(chunk), Some(w)) = (chunks.next(), ws.next()) {
|
while let (Some(chunk), Some(w)) = (chunks.next(), ws.next()) {
|
||||||
render(frame, chunk, w, queue, status, selected, liststate);
|
render(frame, chunk, w, queue, status, liststate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Widget::Textbox(xs) => {
|
Widget::Textbox(xs) => {
|
||||||
|
@ -194,7 +193,7 @@ pub fn render(
|
||||||
current_track,
|
current_track,
|
||||||
Some(track),
|
Some(track),
|
||||||
pos == Some(i),
|
pos == Some(i),
|
||||||
i == selected,
|
liststate.selected() == Some(i),
|
||||||
Style::default(),
|
Style::default(),
|
||||||
);
|
);
|
||||||
items.push(ListItem::new(Spans::from(spans)));
|
items.push(ListItem::new(Spans::from(spans)));
|
||||||
|
|
|
@ -285,7 +285,6 @@ async fn run() -> Result<()> {
|
||||||
&cfg.layout,
|
&cfg.layout,
|
||||||
&queue,
|
&queue,
|
||||||
&status,
|
&status,
|
||||||
selected,
|
|
||||||
&mut liststate,
|
&mut liststate,
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue