Resolve safari not refreshing badge correctly (#1644)

This commit is contained in:
Oscar Hinton 2021-03-01 17:32:18 +01:00 committed by GitHub
parent 8cb51da4ab
commit 97fb84a3e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -738,6 +738,10 @@ export default class MainBackground {
if (this.platformUtilsService.isFirefox()) {
await theAction.setIcon(options);
} else if (this.platformUtilsService.isSafari()) {
// Workaround since Safari 14.0.3 returns a pending promise
// which doesn't resolve within a reasonable time.
theAction.setIcon(options);
} else {
return new Promise(resolve => {
theAction.setIcon(options, () => resolve());