Add delay to dashboard shortcuts to wait for menu to close fully.

This commit is contained in:
Jas Singh
2024-07-14 00:34:48 -07:00
parent a997a6f465
commit ad7c813917
6 changed files with 46 additions and 17 deletions

View File

@@ -15,15 +15,18 @@ const Shortcuts = () => {
});
const handleClick = (action, resolver) => {
App.closeWindow("dashboardmenu");
Utils.execAsync(action)
.then((res) => {
if (typeof resolver === "function") {
return resolver(res);
}
return res;
})
.catch((err) => err);
setTimeout(() => {
Utils.execAsync(action)
.then((res) => {
if (typeof resolver === "function") {
return resolver(res);
}
return res;
})
.catch((err) => err);
}, 250);
};
const recordingDropdown = Widget.Menu({