mirror of
https://github.com/alexpasmantier/television.git
synced 2025-06-06 19:45:23 +00:00
feat(remote): redirect Action::Quit
to Action::ToggleRemoteControl
when in remote mode (#508)
Fixes #505
This commit is contained in:
parent
fc2f8b9473
commit
cfe49ce81c
@ -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)?;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user