shouldn't try to double send things now
This commit is contained in:
parent
ba59e749d7
commit
39a5b9d6e3
1 changed files with 22 additions and 17 deletions
|
@ -74,29 +74,32 @@ impl MessageHandler for StreamState {
|
|||
StateUpdate::TimerText(value) => {self.timer_text = value.clone(); return (Some(StateUpdate::TimerText(value)), None)},
|
||||
StateUpdate::SubScene(value) => {
|
||||
if value.get_type() == Scenes::Camera {
|
||||
self.camera_sub_scene = value;
|
||||
if self.current_scene == Scenes::Camera {
|
||||
hotkey_handler.change_scene(Scenes::Camera, Some(self.camera_sub_scene));
|
||||
}
|
||||
self.camera_sub_scene = value;
|
||||
return (Some(update), None)
|
||||
} else if value.get_type() == Scenes::Screen {
|
||||
self.screen_sub_scene = value;
|
||||
if self.current_scene == Scenes::Screen{
|
||||
hotkey_handler.change_scene(Scenes::Screen, Some(self.screen_sub_scene));
|
||||
}
|
||||
self.screen_sub_scene = value;
|
||||
return (Some(update), None)
|
||||
}
|
||||
},
|
||||
StateUpdate::Scene(value) => {
|
||||
self.current_scene = value;
|
||||
|
||||
if value == Scenes::Screen {
|
||||
if self.current_scene != Scenes::Screen {
|
||||
self.timer_start = SystemTime::now();
|
||||
self.timer_finished = false;
|
||||
}
|
||||
} else {
|
||||
self.timer_finished = true;
|
||||
}
|
||||
|
||||
|
||||
if self.current_scene != value {
|
||||
match self.current_scene {
|
||||
Scenes::Camera => {
|
||||
hotkey_handler.change_scene(Scenes::Camera, Some(self.camera_sub_scene));
|
||||
|
@ -108,7 +111,9 @@ impl MessageHandler for StreamState {
|
|||
hotkey_handler.change_scene(Scenes::Augmented, None);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
self.current_scene = value;
|
||||
return (Some(update), None);
|
||||
},
|
||||
StateUpdate::StreamSoundToggleOn(value) => {hotkey_handler.toggle_stream_sound(value); return (Some(update), None)},
|
||||
|
|
Loading…
Reference in a new issue