Fix mixed up placeholders for new song window input boxes

This commit is contained in:
Gvidas Juknevičius 2026-01-11 21:18:04 +02:00
parent 2aa0e5a1e8
commit 2c2f35ff0a
2 changed files with 7 additions and 7 deletions

View File

@ -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();
}
}

View File

@ -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);