-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix icon flicker #157
Fix icon flicker #157
Conversation
source/extension.svelte
Outdated
// Get a large icon closest to the desired size | ||
for (const icon of icons.reverse()) { | ||
for (const icon of sortedIcons) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! We can actually use .toSorted()
now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I don’t think this fixes it. .sort() also alters the array just like .reverse()
.toSorted()
will fix it, just need to bump the minimum chrome version to 110
Edit: already is!
"minimum_chrome_version": "110", |
To fix #146
The reason that some icon change while toggling the state of other extensions is the use of
reverse
on icon list.To fix it, use a simple sort function to make sure the order does not change.