diff options
| author | krolxon <krolyxon@tutanota.com> | 2024-04-25 12:58:13 +0530 |
|---|---|---|
| committer | krolxon <krolyxon@tutanota.com> | 2024-04-25 12:58:13 +0530 |
| commit | f665c4e9f3b4eaa226b0c813f6845e247a4e6977 (patch) | |
| tree | 03119ed4587357a34f3728700f3a3e19ac89e1b2 /src/app.rs | |
| parent | 4bc03ce8f4dea2ed6d68f2694bd095c9e3857e5e (diff) | |
better event handling with tick, search
Diffstat (limited to 'src/app.rs')
| -rwxr-xr-x | src/app.rs | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -1,3 +1,5 @@ +use std::time::Duration; + use crate::connection::Connection; use crate::list::ContentList; use mpd::Client; @@ -56,7 +58,11 @@ impl App { }) } - pub fn tick(&self) {} + pub fn tick(&mut self) { + self.conn.update_state(); + self.conn.update_progress(); + self.update_queue(); + } pub fn quit(&mut self) { self.running = false; @@ -76,8 +82,7 @@ impl App { // }); conn.conn.queue().unwrap().into_iter().for_each(|x| { vec.push(x.file); - } - ); + }); } pub fn update_queue(&mut self) { |
