* This method registers onStartup listener only if we are in non-persistent world and * icon is in non-default configuration.
()
| 55 | * icon is in non-default configuration. |
| 56 | */ |
| 57 | private static handleUpdate() { |
| 58 | if (!isNonPersistent) { |
| 59 | return; |
| 60 | } |
| 61 | if (IconManager.iconState.badgeText !== '' || !IconManager.iconState.active) { |
| 62 | chrome.runtime.onStartup.addListener(IconManager.onStartup); |
| 63 | } else { |
| 64 | chrome.runtime.onStartup.removeListener(IconManager.onStartup); |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | static setIcon({isActive = this.iconState.active, colorScheme = 'dark', tabId}: IconOptions): void { |
| 69 | if (__THUNDERBIRD__ || !chrome.browserAction.setIcon) { |
no test coverage detected