From cfe49ce81c1eb428b7c38fe5b524d67141099946 Mon Sep 17 00:00:00 2001 From: Alexandre Pasmantier <47638216+alexpasmantier@users.noreply.github.com> Date: Wed, 14 May 2025 21:31:10 +0200 Subject: [PATCH] feat(remote): redirect `Action::Quit` to `Action::ToggleRemoteControl` when in remote mode (#508) Fixes #505 --- television/app.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/television/app.rs b/television/app.rs index be2c481..be12bdc 100644 --- a/television/app.rs +++ b/television/app.rs @@ -364,8 +364,13 @@ impl App { } match action { Action::Quit => { - self.should_quit = true; - self.render_tx.send(RenderingTask::Quit)?; + if self.television.mode == Mode::RemoteControl { + self.action_tx + .send(Action::ToggleRemoteControl)?; + } else { + self.should_quit = true; + self.render_tx.send(RenderingTask::Quit)?; + } } Action::Suspend => { self.should_suspend = true;