Skip to content

Commit 44ab196

Browse files
committed
Fixed notification badge count does not clear when none pending
1 parent 7c29935 commit 44ab196

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

app/browser/tools/mutationTitle.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,10 @@ class MutationObserverTitle {
1515
console.log(window.document.title);
1616
const regex = /^\((\d+)\)/;
1717
const match = window.document.title.match(regex);
18-
if (match) {
19-
const number = match[1];
20-
console.log(number);
21-
const event = new CustomEvent('unread-count', { detail: { number: number } });
22-
window.dispatchEvent(event);
23-
}
18+
const number = match ? match[1] : 0;
19+
console.log(number);
20+
const event = new CustomEvent('unread-count', { detail: { number: number } });
21+
window.dispatchEvent(event);
2422
}
2523
);
2624
observer.observe(window.document.querySelector('title'),{ childList: true });

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "teams-for-linux",
3-
"version": "1.4.19",
3+
"version": "1.4.20",
44
"main": "app/index.js",
55
"description": "Unofficial client for Microsoft Teams for Linux",
66
"homepage": "https://github.com/IsmaelMartinez/teams-for-linux",

0 commit comments

Comments
 (0)