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.
This commit is contained in:
Kristijan Ribarić 2024-09-16 21:10:34 +02:00
parent 95af4ba082
commit f4c876c8de

View file

@ -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];