Skip to content

Commit

Permalink
Close main window before opening dash (raycast#1316)
Browse files Browse the repository at this point in the history
* Close main window before opening dash

If this is not done, and a snippet is selected, the snippet will
be pasted into the raycast search bar.

* Lint fix
  • Loading branch information
iloveitaly authored Apr 11, 2022
1 parent 4972c36 commit 5c7ced6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion extensions/dash/src/components/DashResult.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ActionPanel, List, Action } from "@raycast/api";
import { ActionPanel, List, Action, closeMainWindow } from "@raycast/api";
import { execa } from "execa";
import { decode } from "html-entities";
import { DashResult } from "../types";
Expand Down Expand Up @@ -32,5 +32,6 @@ async function dashCallbackInBackground(dashIndex: number) {
// open within Dash instead of being selected for use. This adds another click for the user. By opening
// in the background (-g) the snippet is selected immediately and the user can start to fill in placeholders
// right away.
await closeMainWindow({ clearRootSearch: true });
await execa("open", ["-g", "dash-workflow-callback://" + dashIndex]);
}

0 comments on commit 5c7ced6

Please sign in to comment.