From 04e5d2ad28af2c0b561ed4443eabddc4ee70d1f2 Mon Sep 17 00:00:00 2001 From: krolxon Date: Fri, 26 Apr 2024 14:32:58 +0530 Subject: alot of edge cases removed, ui improvments --- src/app.rs | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'src/app.rs') diff --git a/src/app.rs b/src/app.rs index be7c358..b43cd7a 100755 --- a/src/app.rs +++ b/src/app.rs @@ -14,7 +14,6 @@ pub struct App { /// check if app is running pub running: bool, pub conn: Connection, - pub song_list: ContentList, pub queue_list: ContentList, pub pl_list: ContentList, pub selected_tab: SelectedTab, @@ -28,16 +27,6 @@ pub enum SelectedTab { Playlists, } -impl SelectedTab { - fn as_usize(&self) { - match self { - SelectedTab::Queue => 0, - SelectedTab::Playlists => 1, - SelectedTab::DirectoryBrowser => 2, - }; - } -} - impl App { pub fn builder(addrs: &str) -> AppResult { let mut conn = Connection::new(addrs).unwrap(); @@ -47,14 +36,10 @@ impl App { Self::get_queue(&mut conn, &mut queue_list.list); - let mut song_list = ContentList::new(); - song_list.list = conn.songs_filenames.clone(); - let browser = FileBrowser::new(); Ok(Self { running: true, conn, - song_list, queue_list, pl_list, selected_tab: SelectedTab::DirectoryBrowser, @@ -63,11 +48,9 @@ impl App { } pub fn tick(&mut self) { - self.conn.update_state(); - self.conn.update_progress(); - self.conn.update_volume(); + self.conn.update_status(); self.update_queue(); - self.browser.update_directory(&mut self.conn).unwrap(); + // self.browser.update_directory(&mut self.conn).unwrap(); } pub fn quit(&mut self) { -- cgit v1.2.3