-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: avoid internal requests for action icons (#788)
This change checks if icon changed, and sets it only when it is needed, removing overhead of redraw and internal requests. Context: every time peer count was updated, the browser action icon got set, which caused unnecessary internal request for PNG assets on Chrome. Chrome does not support SVG in browser action, so we also had to compute the path of PNG (it is now memoized).
- Loading branch information
Showing
3 changed files
with
61 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters