feat(remote): redirect Action::Quit to Action::ToggleRemoteControl when in remote mode

This commit is contained in:
Alexandre Pasmantier 2025-05-14 21:26:43 +02:00
parent fc2f8b9473
commit fa09bc69f8

View File

@ -364,9 +364,14 @@ impl App {
} }
match action { match action {
Action::Quit => { Action::Quit => {
if self.television.mode == Mode::RemoteControl {
self.action_tx
.send(Action::ToggleRemoteControl)?;
} else {
self.should_quit = true; self.should_quit = true;
self.render_tx.send(RenderingTask::Quit)?; self.render_tx.send(RenderingTask::Quit)?;
} }
}
Action::Suspend => { Action::Suspend => {
self.should_suspend = true; self.should_suspend = true;
self.render_tx.send(RenderingTask::Suspend)?; self.render_tx.send(RenderingTask::Suspend)?;