From fa09bc69f8a9ac7dfc10dfc2f42e16a5f1e2991c Mon Sep 17 00:00:00 2001 From: Alexandre Pasmantier Date: Wed, 14 May 2025 21:26:43 +0200 Subject: [PATCH] feat(remote): redirect `Action::Quit` to `Action::ToggleRemoteControl` when in remote mode --- 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;