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

Fixes #505
This commit is contained in:
Alexandre Pasmantier 2025-05-14 21:31:10 +02:00 committed by GitHub
parent fc2f8b9473
commit cfe49ce81c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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)?;