The IDE you know, rebuilt in Rust. IntelliJ IDEA–style keymap, tool windows and search-everywhere in a fast native app: editor, code insight, debugger, Git, terminal, database and HTTP clients for 60+ languages.
TypeScript code-editorcross-platformdapdatabase-clientdebuggerdesktop-appdeveloper-toolsgithttp-clientideintellijlsprusttauriterminal
fix(remote): run commands on the main thread after authorization (#600)
l0ng-aib3c315048948
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rsindex 006b6aa7a..cc2439dc1 100644--- a/src-tauri/src/lib.rs+++ b/src-tauri/src/lib.rs@@ -95,10 +95,19 @@ pub fn run() {let label = label.to_owned();let command = request.message.command().to_owned();let invoke = invoke.clone();+ let app = webview.app_handle().clone();tauri::async_runtime::spawn(async move {match connection.authorize_command(&label, &command).await {Ok(()) => {- invoke(request);+ let resolver = request.resolver.clone();+ // Sync commands must run on the main thread, as they do in local windows.+ if let Err(error) = app.run_on_main_thread(move || {+ invoke(request);+ }) {+ resolver.reject(ide_core::IdeError::internal(format!(+ "failed to dispatch command on the main thread: {error}"+ )));+ }}Err(error) => request.resolver.reject(error),}