Updated Title Display
This commit is contained in:
parent
2bb9b3bdd7
commit
51858593c2
@ -466,12 +466,11 @@ fn QueueToggle(status: RwSignal<PlayStatus>) -> impl IntoView {
|
|||||||
pub fn CustomTitle(play_status: RwSignal<PlayStatus>) -> impl IntoView {
|
pub fn CustomTitle(play_status: RwSignal<PlayStatus>) -> impl IntoView {
|
||||||
let title = create_memo(move |_| {
|
let title = create_memo(move |_| {
|
||||||
play_status.with(|play_status| {
|
play_status.with(|play_status| {
|
||||||
match play_status.queue.front() {
|
play_status.queue.front().map_or("LibreTunes".to_string(), |song_data| {
|
||||||
Some(song_data) => song_data.title.clone(),
|
format!("{} - {} | {}",song_data.title.clone(),Artist::display_list(&song_data.artists), "LibreTunes")
|
||||||
None => "LibreTunes".to_owned(),
|
})
|
||||||
}
|
})
|
||||||
})
|
});
|
||||||
});
|
|
||||||
view! {
|
view! {
|
||||||
<Title text=title />
|
<Title text=title />
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user