diff --git a/rust/client/src/ui/mod.rs b/rust/client/src/ui/mod.rs index b7bc0ed..a8cc18a 100644 --- a/rust/client/src/ui/mod.rs +++ b/rust/client/src/ui/mod.rs @@ -297,7 +297,7 @@ pub fn run(minimized: bool, scenario_runner_data: Option) { .subscription(subscription) .theme(|state, _| state.theme.clone()) .run() - .expect("Unable to start scenario application"); + .expect("Unable to start application"); } fn new(minimized: bool, #[allow(unused)] scenario_runner_data: Option) -> (AppModel, Task) { diff --git a/rust/client/src/ui/server.rs b/rust/client/src/ui/server.rs index 355dfbb..93618d6 100644 --- a/rust/client/src/ui/server.rs +++ b/rust/client/src/ui/server.rs @@ -115,10 +115,10 @@ async fn request_loop( AppMsg::ClearInlineView { plugin_id } } - FrontendApiRequestData::ShowWindow {} => { - responder.respond(Ok(FrontendApiResponseData::ShowWindow { data: () })); + FrontendApiRequestData::ToggleWindow {} => { + responder.respond(Ok(FrontendApiResponseData::ToggleWindow { data: () })); - AppMsg::WindowAction(WindowActionMsg::ShowWindow) + AppMsg::WindowAction(WindowActionMsg::ToggleWindow) } FrontendApiRequestData::HideWindow {} => { responder.respond(Ok(FrontendApiResponseData::HideWindow { data: () })); diff --git a/rust/client/src/ui/windows/mod.rs b/rust/client/src/ui/windows/mod.rs index 3332cd5..f87dc15 100644 --- a/rust/client/src/ui/windows/mod.rs +++ b/rust/client/src/ui/windows/mod.rs @@ -313,7 +313,7 @@ fn window_settings(position: Position) -> window::Settings { } #[cfg(target_os = "macos")] -pub fn macos_focus_previous_app() -> Task { +pub fn macos_focus_previous_app() { unsafe { // when closing NSPanel current active application doesn't automatically become key window // is there a proper way? without doing this manually diff --git a/rust/common/src/rpc/frontend_api.rs b/rust/common/src/rpc/frontend_api.rs index 4dc3e3d..cdc0f81 100644 --- a/rust/common/src/rpc/frontend_api.rs +++ b/rust/common/src/rpc/frontend_api.rs @@ -30,7 +30,7 @@ pub trait FrontendApi { async fn clear_inline_view(&self, plugin_id: PluginId) -> RequestResult<()>; - async fn show_window(&self) -> RequestResult<()>; + async fn toggle_window(&self) -> RequestResult<()>; async fn hide_window(&self) -> RequestResult<()>; diff --git a/rust/server/src/plugins/mod.rs b/rust/server/src/plugins/mod.rs index 2c894a8..319c7b8 100644 --- a/rust/server/src/plugins/mod.rs +++ b/rust/server/src/plugins/mod.rs @@ -185,12 +185,6 @@ impl ApplicationManager { result } - pub async fn show_window(&self) -> anyhow::Result<()> { - self.frontend_api.show_window().await?; - - Ok(()) - } - pub async fn run_action( &self, plugin_id: PluginId,