Merge pull request #413 from yuya-oc/unread-team-sidebar
Count unread teams in team sidebar
This commit is contained in:
@@ -14,6 +14,7 @@ Release date: TBD
|
|||||||
|
|
||||||
#### All Platforms
|
#### All Platforms
|
||||||
- Suppress white screen which is displayed for a moment on startup
|
- Suppress white screen which is displayed for a moment on startup
|
||||||
|
- Support unread indications in team sidebar of Mattermost server 3.6
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
|
@@ -36,6 +36,12 @@ setInterval(function getUnreadCount() {
|
|||||||
// Note: the active channel doesn't have '.unread-title'.
|
// Note: the active channel doesn't have '.unread-title'.
|
||||||
var unreadCount = document.getElementsByClassName('unread-title').length;
|
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
|
// mentionCount in sidebar
|
||||||
var elem = document.getElementsByClassName('badge');
|
var elem = document.getElementsByClassName('badge');
|
||||||
var mentionCount = 0;
|
var mentionCount = 0;
|
||||||
|
Reference in New Issue
Block a user