Merge pull request #413 from yuya-oc/unread-team-sidebar

Count unread teams in team sidebar
This commit is contained in:
Yuya Ochiai 2017-01-18 21:45:44 +09:00 committed by GitHub
commit 7948514da9
2 changed files with 7 additions and 0 deletions

View file

@ -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

View file

@ -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;