Skip to content

Commit

Permalink
fix: Don't wait for icon changes when spinning
Browse files Browse the repository at this point in the history
  • Loading branch information
kewisch committed Aug 10, 2024
1 parent d23946d commit 717a7b5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "quickmove",
"description": "Quick Folder Move",
"version": "2.9.0",
"version": "2.9.1",
"private": true,
"author": "Philipp Kewisch <[email protected]>",
"license": "MPL-2.0",
Expand Down
8 changes: 4 additions & 4 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ async function spinWith(func, ...args) {
let rv;
try {
gSpinLevel++;
await browser.browserAction.setIcon({ path: "/images/spinner.svg" });
await browser.messageDisplayAction.setIcon({ path: "/images/spinner.svg" });
browser.browserAction.setIcon({ path: "/images/spinner.svg" });
browser.messageDisplayAction.setIcon({ path: "/images/spinner.svg" });
rv = await func(...args);
} finally {
gSpinLevel--;

if (gSpinLevel == 0) {
await browser.browserAction.setIcon({ path: "/images/addon.svg" });
await browser.messageDisplayAction.setIcon({ path: "/images/addon.svg" });
browser.browserAction.setIcon({ path: "/images/addon.svg" });
browser.messageDisplayAction.setIcon({ path: "/images/addon.svg" });
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
"manifest_version": 2,
"name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__",
"version": "2.9.0",
"version": "2.9.1",
"default_locale": "en",
"author": "Philipp Kewisch",
"browser_specific_settings": {
"gecko": {
"id": "[email protected]",
"strict_min_version": "115.0a1",
"strict_max_version": "128.*"
"strict_max_version": "129.*"
}
},
"icons": {
Expand Down

0 comments on commit 717a7b5

Please sign in to comment.