Merge pull request #413 from yuya-oc/unread-team-sidebar
Count unread teams in team sidebar
This commit is contained in:
commit
7948514da9
|
@ -14,6 +14,7 @@ Release date: TBD
|
|||
|
||||
#### All Platforms
|
||||
- Suppress white screen which is displayed for a moment on startup
|
||||
- Support unread indications in team sidebar of Mattermost server 3.6
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
|
|
|
@ -36,6 +36,12 @@ setInterval(function getUnreadCount() {
|
|||
// Note: the active channel doesn't have '.unread-title'.
|
||||
var unreadCount = document.getElementsByClassName('unread-title').length;
|
||||
|
||||
// unreadCount in team sidebar
|
||||
const teamSideBar = document.getElementsByClassName('team-sidebar'); // team-sidebar doesn't have id
|
||||
if (teamSideBar.length === 1) {
|
||||
unreadCount += teamSideBar[0].getElementsByClassName('unread').length;
|
||||
}
|
||||
|
||||
// mentionCount in sidebar
|
||||
var elem = document.getElementsByClassName('badge');
|
||||
var mentionCount = 0;
|
||||
|
|
Loading…
Reference in a new issue