Skip to content

Commit

Permalink
Merge pull request #1180 from jijojosephk/fix_notification_clear
Browse files Browse the repository at this point in the history
Fixed notification badge count does not clear when none pending
  • Loading branch information
jijojosephk authored Apr 6, 2024
2 parents 7c29935 + 44ab196 commit bce4a93
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions app/browser/tools/mutationTitle.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@ class MutationObserverTitle {
console.log(window.document.title);
const regex = /^\((\d+)\)/;
const match = window.document.title.match(regex);
if (match) {
const number = match[1];
console.log(number);
const event = new CustomEvent('unread-count', { detail: { number: number } });
window.dispatchEvent(event);
}
const number = match ? match[1] : 0;
console.log(number);
const event = new CustomEvent('unread-count', { detail: { number: number } });
window.dispatchEvent(event);
}
);
observer.observe(window.document.querySelector('title'),{ childList: true });
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "teams-for-linux",
"version": "1.4.19",
"version": "1.4.20",
"main": "app/index.js",
"description": "Unofficial client for Microsoft Teams for Linux",
"homepage": "https://github.com/IsmaelMartinez/teams-for-linux",
Expand Down

0 comments on commit bce4a93

Please sign in to comment.