From 1feaca41b34cec771b6b08510df314eb116a65e0 Mon Sep 17 00:00:00 2001 From: Nickiel12 <35903114+Nickiel12@users.noreply.github.com> Date: Wed, 29 Jun 2022 18:04:27 -0700 Subject: [PATCH] addresses issue #2 --- src/modules/message_handler.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/message_handler.rs b/src/modules/message_handler.rs index 220a03f..6d0b57e 100644 --- a/src/modules/message_handler.rs +++ b/src/modules/message_handler.rs @@ -109,11 +109,13 @@ impl MessageHandler for StreamState { } else { self.timer_finished = true; } - + + let mut instruction = None; if self.current_scene != value { match value { Scenes::Camera => { hotkey_handler.change_scene(Scenes::Camera, Some(self.camera_sub_scene)); + instruction = Some(vec![StateUpdate::TimerText("0.0".to_string())]) }, Scenes::Screen => { hotkey_handler.change_scene(Scenes::Screen, Some(self.screen_sub_scene)); @@ -125,7 +127,7 @@ impl MessageHandler for StreamState { } self.current_scene = value; - return (Some(update), None); + return (Some(update), instruction); }, StateUpdate::StreamSoundToggleOn(value) => {hotkey_handler.toggle_stream_sound(value); return (Some(update), None)}, StateUpdate::ToggleComputerSoundOn(value) => {hotkey_handler.toggle_computer_sound(!value); return (Some(StateUpdate::ToggleComputerSoundOn(!value)), None)},