Skip to content
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

If icon is unknown, use default icon #1548

Merged
merged 3 commits into from
Jan 12, 2024

Conversation

RebeccaMahany
Copy link
Contributor

Currently, if the icon launcher receives is unknown to it, we won't use an icon at all. This looks a little confusing because the menu bar app is still clickable, just invisible. Instead, we should fall back to using the default icon.

Testing notes

Tested by adjusting the icon written to menu.json in runner.go:

parsedMenuDataStr = strings.Replace(parsedMenuDataStr, `"icon":"default"`, `"icon":"fake"`, -1)

directionless
directionless previously approved these changes Jan 12, 2024
@@ -53,8 +42,19 @@ func getIcon(icon menuIcon) []byte {
assets.MenubarCircleXMonochromeIco,
assets.MenubarCircleXMonochromePng,
)
case DefaultIcon:
fallthrough
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL about the fallthrough keyword =)

@RebeccaMahany RebeccaMahany added this pull request to the merge queue Jan 12, 2024
Merged via the queue into kolide:main with commit 14719ad Jan 12, 2024
25 checks passed
@RebeccaMahany RebeccaMahany deleted the becca/default-icon branch January 12, 2024 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants