aboutsummaryrefslogtreecommitdiff
path: root/src/app/runtime_mutations.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-06-30 20:29:57 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-06-30 20:29:57 +0300
commit0bab01573a781abda0ddf08046e7e4ce4568d696 (patch)
treee3be41d834fab62d71cc8fa5b0f13f30260922e4 /src/app/runtime_mutations.rs
parent9a91a2ac41a5b2fbc2811922750a782b45115219 (diff)
refactor: route headless workspace tab mutations through runtime dispatch
Diffstat (limited to 'src/app/runtime_mutations.rs')
-rw-r--r--src/app/runtime_mutations.rs30
1 files changed, 10 insertions, 20 deletions
diff --git a/src/app/runtime_mutations.rs b/src/app/runtime_mutations.rs
index fae52d60..4a94593c 100644
--- a/src/app/runtime_mutations.rs
+++ b/src/app/runtime_mutations.rs
@@ -3,20 +3,16 @@ use crate::api::schema::{Method, PaneTarget, TabTarget, WorkspaceTarget};
use super::App;
impl App {
- pub(crate) fn dispatch_tui_runtime_mutation(
- &mut self,
- id: &'static str,
- method: Method,
- ) -> String {
- self.dispatch_tui_api_request(id, method)
+ pub(crate) fn dispatch_runtime_mutation(&mut self, id: &'static str, method: Method) -> String {
+ self.dispatch_api_request(id, method)
}
- pub(crate) fn dispatch_tui_deferred_runtime_mutation(
+ pub(crate) fn dispatch_deferred_runtime_mutation(
&mut self,
id: &'static str,
method: Method,
) -> Option<String> {
- self.dispatch_tui_deferred_api_request(id, method)
+ self.dispatch_deferred_api_request(id, method)
}
pub(crate) fn runtime_workspace_focus(
@@ -24,10 +20,7 @@ impl App {
id: &'static str,
workspace_id: String,
) -> String {
- self.dispatch_tui_runtime_mutation(
- id,
- Method::WorkspaceFocus(WorkspaceTarget { workspace_id }),
- )
+ self.dispatch_runtime_mutation(id, Method::WorkspaceFocus(WorkspaceTarget { workspace_id }))
}
pub(crate) fn runtime_workspace_close(
@@ -35,25 +28,22 @@ impl App {
id: &'static str,
workspace_id: String,
) -> String {
- self.dispatch_tui_runtime_mutation(
- id,
- Method::WorkspaceClose(WorkspaceTarget { workspace_id }),
- )
+ self.dispatch_runtime_mutation(id, Method::WorkspaceClose(WorkspaceTarget { workspace_id }))
}
pub(crate) fn runtime_tab_focus(&mut self, id: &'static str, tab_id: String) -> String {
- self.dispatch_tui_runtime_mutation(id, Method::TabFocus(TabTarget { tab_id }))
+ self.dispatch_runtime_mutation(id, Method::TabFocus(TabTarget { tab_id }))
}
pub(crate) fn runtime_tab_close(&mut self, id: &'static str, tab_id: String) -> String {
- self.dispatch_tui_runtime_mutation(id, Method::TabClose(TabTarget { tab_id }))
+ self.dispatch_runtime_mutation(id, Method::TabClose(TabTarget { tab_id }))
}
pub(crate) fn runtime_pane_focus(&mut self, id: &'static str, pane_id: String) -> String {
- self.dispatch_tui_runtime_mutation(id, Method::PaneFocus(PaneTarget { pane_id }))
+ self.dispatch_runtime_mutation(id, Method::PaneFocus(PaneTarget { pane_id }))
}
pub(crate) fn runtime_pane_close(&mut self, id: &'static str, pane_id: String) -> String {
- self.dispatch_tui_runtime_mutation(id, Method::PaneClose(PaneTarget { pane_id }))
+ self.dispatch_runtime_mutation(id, Method::PaneClose(PaneTarget { pane_id }))
}
}