From 2c2f35ff0aad992f88ffd718aea1e4c971c0270a Mon Sep 17 00:00:00 2001 From: MCorange Date: Sun, 11 Jan 2026 21:18:04 +0200 Subject: [PATCH] Fix mixed up placeholders for new song window input boxes --- xmpd-gui/src/components/song_list/mod.rs | 2 +- xmpd-gui/src/windows/new_song.rs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/xmpd-gui/src/components/song_list/mod.rs b/xmpd-gui/src/components/song_list/mod.rs index e238f31..02aa3a1 100644 --- a/xmpd-gui/src/components/song_list/mod.rs +++ b/xmpd-gui/src/components/song_list/mod.rs @@ -25,7 +25,7 @@ impl CompUi for SongList { let mut sl = SongList::get()?; sl.playable_songs = Self::get_playable_songs(&songs)?; if let Some((sid, _)) = songs.first() { - if sl.selected_sid == Default::default() { + if sl.selected_sid.eq(&uuid::Uuid::default()) { sl.selected_sid = (*sid).clone(); } } diff --git a/xmpd-gui/src/windows/new_song.rs b/xmpd-gui/src/windows/new_song.rs index 5addfa4..d81e9b4 100644 --- a/xmpd-gui/src/windows/new_song.rs +++ b/xmpd-gui/src/windows/new_song.rs @@ -99,8 +99,8 @@ impl Window for NewSongW { ui.horizontal(|ui| { ui.add_space(3.0); if ui.button("Close").clicked() { - self.author = String::from("New Song"); - self.name = String::from("Unknown"); + self.author = String::from("Unknown"); + self.name = String::from("New Song"); self.source_t = SourceType::Youtube; self.source_url = String::default(); state.windows.toggle(&WindowId::NewSong, false); @@ -112,15 +112,15 @@ impl Window for NewSongW { s.set_author(&self.author); state.manifest.store_mut().get_songs_mut().insert(uuid::Uuid::new_v4(), s); - self.author = String::from("New Song"); - self.name = String::from("Unknown"); + self.author = String::from("Unknown"); + self.name = String::from("New Song"); self.source_t = SourceType::Youtube; self.source_url = String::default(); } if ui.button("Cancel").clicked() { - self.author = String::from("New Song"); - self.name = String::from("Unknown"); + self.author = String::from("Unknown"); + self.name = String::from("New Song"); self.source_t = SourceType::Youtube; self.source_url = String::default(); state.windows.toggle(&WindowId::NewSong, false);