customize taskbar icon depending to session (#2899)
Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
parent
794a326350
commit
9f80b7d82b
|
@ -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 () => {
|
||||
|
@ -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', () => {
|
||||
|
|
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue