mirror of
https://github.com/bitwarden/browser
synced 2025-01-20 00:12:09 +01:00
Resolve safari not refreshing badge correctly (#1644)
This commit is contained in:
parent
8cb51da4ab
commit
97fb84a3e3
@ -738,6 +738,10 @@ export default class MainBackground {
|
|||||||
|
|
||||||
if (this.platformUtilsService.isFirefox()) {
|
if (this.platformUtilsService.isFirefox()) {
|
||||||
await theAction.setIcon(options);
|
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 {
|
} else {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
theAction.setIcon(options, () => resolve());
|
theAction.setIcon(options, () => resolve());
|
||||||
|
Loading…
Reference in New Issue
Block a user