From f4c876c8dee8d2dd15243f096e36e05cfc6f63c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristijan=20Ribari=C4=87?= Date: Mon, 16 Sep 2024 21:10:34 +0200 Subject: [PATCH] fix: Await workspace save in `changeWorkspace` This change ensures that the `unsafeSaveWorkspaces` function is called asynchronously. This is necessary to prevent blocking the UI thread while saving the workspaces. --- src/ZenWorkspaces.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ZenWorkspaces.mjs b/src/ZenWorkspaces.mjs index 1377f8b..77b8c7c 100644 --- a/src/ZenWorkspaces.mjs +++ b/src/ZenWorkspaces.mjs @@ -488,7 +488,7 @@ var ZenWorkspaces = { for (let workspace of workspaces.workspaces) { workspace.used = workspace.uuid === window.uuid; } - this.unsafeSaveWorkspaces(workspaces); + await this.unsafeSaveWorkspaces(workspaces); console.info('ZenWorkspaces: Changing workspace to', window.uuid); for (let i = 0; i < gBrowser.tabs.length; i++) { let tab = gBrowser.tabs[i];