Conversation
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
|
|
|
||
| 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(); | ||
| } | ||
| }); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Actually, nevermind. Reading through the rest of it I see that -1 is used for an error state, so this makes sense.
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
Was the downgrade intentional?


No description provided.