Mountain/IPC/WindServiceHandlers/UI/KeybindingRemove.rs
1#![allow(unused_variables)]
2
3//! Wire method: `keybinding:remove`.
4
5use std::sync::Arc;
6
7use serde_json::Value;
8
9use crate::RunTime::ApplicationRunTime::ApplicationRunTime;
10
11pub async fn Fn(RunTime:Arc<ApplicationRunTime>, Arguments:Vec<Value>) -> Result<Value, String> {
12 let CommandId = Arguments
13 .first()
14 .and_then(|V| V.as_str())
15 .ok_or("keybinding:remove requires commandId".to_string())?;
16
17 RunTime
18 .Environment
19 .ApplicationState
20 .Feature
21 .Keybindings
22 .RemoveKeybinding(CommandId);
23
24 Ok(Value::Null)
25}