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

MM-28933 Customize taskbar icon depends to session #2899

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/main/badge.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ describe('main/badge', () => {
jest.clearAllMocks();
});

it('should show dot when session expired', async () => {
it('should show exclamation when session expired', async () => {
Badge.showBadgeWindows(true, 0, false);
await promise;
expect(window.setOverlayIcon).toBeCalledWith(expect.stringContaining('window.drawBadge(\'\', false)'), expect.any(String));
expect(window.setOverlayIcon).toBeCalledWith(expect.stringContaining('window.drawBadge(\'!\', false)'), expect.any(String));
});

it('should show mention count when has mention count', async () => {
Expand Down Expand Up @@ -95,9 +95,9 @@ describe('main/badge', () => {
jest.clearAllMocks();
});

it('should show dot when session expired', () => {
it('should show exclamation when session expired', () => {
Badge.showBadgeOSX(true, 0, false);
expect(app.dock.setBadge).toBeCalledWith('');
expect(app.dock.setBadge).toBeCalledWith('!');
});

it('should show mention count when has mention count', () => {
Expand Down
4 changes: 2 additions & 2 deletions src/main/badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export function showBadgeWindows(sessionExpired: boolean, mentionCount: number,
text = '•';
description = localizeMessage('main.badge.unreadChannels', 'You have unread channels');
} else if (sessionExpired) {
text = '';
text = '!';
description = localizeMessage('main.badge.sessionExpired', 'Session Expired: Please sign in to continue receiving notifications.');
}
setOverlayIcon(text, description, mentionCount > 99);
Expand All @@ -98,7 +98,7 @@ export function showBadgeOSX(sessionExpired: boolean, mentionCount: number, show
} else if (showUnreadBadge && showUnreadBadgeSetting) {
badge = '•';
} else if (sessionExpired) {
badge = '';
badge = '!';
}
app.dock.setBadge(badge);
}
Expand Down
Loading