fixed timer starting when clicker auto off

This commit is contained in:
Nickiel12 2022-01-09 13:40:24 -08:00
parent 5915c5406f
commit 74cedc3b08

View file

@ -25,10 +25,7 @@ impl MessageHandler for StreamState {
match update { match update {
StateUpdate::ChangeSlide(direction) => { StateUpdate::ChangeSlide(direction) => {
if self.timer_can_run {
self.timer_finished = false;
self.timer_start = SystemTime::now();
}
match direction { match direction {
SlideChange::NextHotkey => { SlideChange::NextHotkey => {
hotkey_handler.next_slide(true); hotkey_handler.next_slide(true);
@ -44,6 +41,10 @@ impl MessageHandler for StreamState {
}, },
} }
if self.change_scene_on_change_slide_hotkey { if self.change_scene_on_change_slide_hotkey {
if self.timer_can_run {
self.timer_finished = false;
self.timer_start = SystemTime::now();
}
let mut instructions = Vec::new(); let mut instructions = Vec::new();
instructions.push(StateUpdate::Scene(Scenes::Screen)); instructions.push(StateUpdate::Scene(Scenes::Screen));