turn off autorefresh and redraw only on demand
this should significantly reduce CPU usage but is a little bit more complicated. while we're at it, remove the different screen redraw events and use a combined event for all screens. TODO: the spotify player still needs to update the statusbar at least every second.
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
use crossbeam_channel::{unbounded, Receiver, Sender, TryIter};
|
||||
use cursive::{CbFunc, Cursive};
|
||||
|
||||
use queue::QueueEvent;
|
||||
use spotify::PlayerEvent;
|
||||
use ui::playlist::PlaylistEvent;
|
||||
|
||||
pub enum Event {
|
||||
Queue(QueueEvent),
|
||||
Player(PlayerEvent),
|
||||
Playlist(PlaylistEvent),
|
||||
ScreenChange(String),
|
||||
}
|
||||
|
||||
pub type EventSender = Sender<Event>;
|
||||
|
||||
Reference in New Issue
Block a user