Skip to content

Conversation

setchy
Copy link
Member

@setchy setchy commented Oct 2, 2025

No description provided.

Signed-off-by: Adam Setch <[email protected]>
@github-actions github-actions bot added the bug Something isn't working label Oct 2, 2025
Signed-off-by: Adam Setch <[email protected]>
@setchy setchy merged commit 287f48b into main Oct 3, 2025
9 checks passed
@setchy setchy deleted the fix/icon-color-idle branch October 3, 2025 00:01
@github-actions github-actions bot added this to the Release 6.9.1 milestone Oct 3, 2025
Copy link

sonarqubecloud bot commented Oct 3, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
35.9% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Comment on lines -177 to 185

onMainEvent(EVENTS.ICON_ERROR, () => {
onMainEvent(EVENTS.UPDATE_ICON_COLOR, (_, notificationsCount: number) => {
if (!mb.tray.isDestroyed()) {
mb.tray.setImage(TrayIcons.error);
}
});
if (notificationsCount < 0) {
setErrorIcon();
return;
}

onMainEvent(EVENTS.ICON_ACTIVE, () => {
if (!mb.tray.isDestroyed() && shouldUseUnreadActiveIcon) {
}
});
if (notificationsCount > 0) {
setActiveIcon();
return;
}

onMainEvent(EVENTS.ICON_IDLE, () => {
if (!mb.tray.isDestroyed()) {
setIdleIcon();
}
});

Choose a reason for hiding this comment

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

This is a naive quick skim of this code; but the logic around setErrorIcon looks weird. Is that correct?

Might just be the diff making things look more confusing; but currently it sort of looks like the error icon will be used if notificationsCount < 0?

Choose a reason for hiding this comment

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

Actually, nevermind. Reading through the rest of it I see that -1 is used for an error state, so this makes sense.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for taking a look.

That's correct, at the moment a negative number is used to flag that the app is in error state.

Some further room for improvement

"webpack-merge": "6.0.1"
},
"packageManager": "pnpm@10.18.0",
"packageManager": "pnpm@10.17.0",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Was the downgrade intentional?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, timing issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

3 participants