From fa63106120a3f45ace175b7e7fbe4d0d0f81ee65 Mon Sep 17 00:00:00 2001 From: NedNoodleHead Date: Mon, 3 Jun 2024 09:54:21 -0700 Subject: [PATCH] closed #44, also fixed the table up a little bit, and made behaviours regarding playing / seeking better --- src/gui/start.rs | 6 +++++- src/gui/subscription.rs | 1 + src/gui/table.rs | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gui/start.rs b/src/gui/start.rs index 738eb91..e218c37 100644 --- a/src/gui/start.rs +++ b/src/gui/start.rs @@ -219,7 +219,6 @@ impl Application for App { data.author, data.title, data.album ); self.current_song.store(Arc::new(data)); - // should we reset the scrubbing bar? Command::none() } Self::Message::VolumeChange(val) => { @@ -458,6 +457,9 @@ impl Application for App { Self::Message::SongFound(obj_or_err) => { match obj_or_err { Ok(obj) => { + if self.is_paused { + self.is_paused = false; + } self.sender .as_ref() .unwrap() @@ -498,6 +500,8 @@ impl Application for App { .unwrap() .send(PungeCommand::ChangeSong(song)) .unwrap(); + // reset scrubber on successful song change! + self.scrubber = 0; Command::none() } Self::Message::ChangeViewingPlaylist(playlist) => { diff --git a/src/gui/subscription.rs b/src/gui/subscription.rs index 33e6705..c8b82e3 100644 --- a/src/gui/subscription.rs +++ b/src/gui/subscription.rs @@ -246,6 +246,7 @@ impl App { music_obj.sink.set_volume((val as f32) / 80.0) } PungeCommand::ChangeSong(uuid) => { + println!("here?"); let index = music_obj .list .iter() diff --git a/src/gui/table.rs b/src/gui/table.rs index ccfbaca..9b8ab15 100644 --- a/src/gui/table.rs +++ b/src/gui/table.rs @@ -40,7 +40,7 @@ impl<'a> table::Column<'a, ProgramCommands, Theme, Renderer> for Column { ColumnKind::Author => text("Author").into(), ColumnKind::Title => text("Title").into(), ColumnKind::Album => text("Album").into(), - ColumnKind::Edit => button(text("eeee")) + ColumnKind::Edit => button(text("edit").size(10)) .width(100) .height(100) .on_press(ProgramCommands::OpenSongEditPage)