From 97fb84a3e3b037324c216bb55af8a03cd6846493 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Mon, 1 Mar 2021 17:32:18 +0100 Subject: [PATCH] Resolve safari not refreshing badge correctly (#1644) --- src/background/main.background.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/background/main.background.ts b/src/background/main.background.ts index f4aacadcb8..b01a5d9ac4 100644 --- a/src/background/main.background.ts +++ b/src/background/main.background.ts @@ -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());