mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Code clean up, and better comments, along with z-index fixes for scrollbar and avatar menu
This commit is contained in:
parent
f2e8607433
commit
ff3ad47be7
@ -119,7 +119,6 @@ var RoomSubList = React.createClass({
|
|||||||
// The dataset elements are added in the RoomList _initAndPositionStickyHeaders method
|
// The dataset elements are added in the RoomList _initAndPositionStickyHeaders method
|
||||||
isCollapsableOnClick: function() {
|
isCollapsableOnClick: function() {
|
||||||
var stuck = this.refs.header.dataset.stuck;
|
var stuck = this.refs.header.dataset.stuck;
|
||||||
var topBottomSticky = this.refs.header.dataset.topBottomSticky;
|
|
||||||
if (this.state.hidden || stuck === undefined || stuck === "none") {
|
if (this.state.hidden || stuck === undefined || stuck === "none") {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
@ -249,11 +248,8 @@ var RoomSubList = React.createClass({
|
|||||||
|
|
||||||
roomNotificationCount: function() {
|
roomNotificationCount: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
var subListCount = 0;
|
|
||||||
var subListHighlight = false;
|
|
||||||
var cli = MatrixClientPeg.get();
|
|
||||||
|
|
||||||
this.props.list.map(function(room) {
|
return this.props.list.reduce(function(result, room) {
|
||||||
var roomNotifState = RoomNotifs.getRoomNotifsState(room.roomId);
|
var roomNotifState = RoomNotifs.getRoomNotifsState(room.roomId);
|
||||||
var highlight = room.getUnreadNotificationCount('highlight') > 0 || self.props.label === 'Invites';
|
var highlight = room.getUnreadNotificationCount('highlight') > 0 || self.props.label === 'Invites';
|
||||||
var notificationCount = room.getUnreadNotificationCount();
|
var notificationCount = room.getUnreadNotificationCount();
|
||||||
@ -263,14 +259,13 @@ var RoomSubList = React.createClass({
|
|||||||
const badges = notifBadges || mentionBadges;
|
const badges = notifBadges || mentionBadges;
|
||||||
|
|
||||||
if (badges) {
|
if (badges) {
|
||||||
subListCount += notificationCount;
|
result[0] += notificationCount;
|
||||||
if (highlight) {
|
if (highlight) {
|
||||||
subListHighlight = true;
|
result[1] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
return result;
|
||||||
|
}, [0, false]);
|
||||||
return [subListCount, subListHighlight];
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateSubListCount: function() {
|
_updateSubListCount: function() {
|
||||||
|
@ -35,5 +35,5 @@ limitations under the License.
|
|||||||
|
|
||||||
/* Make sure the scrollbar is above the sticky headers from RoomList */
|
/* Make sure the scrollbar is above the sticky headers from RoomList */
|
||||||
.mx_RoomList_scrollbar .gm-scrollbar.-vertical {
|
.mx_RoomList_scrollbar .gm-scrollbar.-vertical {
|
||||||
z-index: 3;
|
z-index: 5;
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,7 @@ limitations under the License.
|
|||||||
flex: 1 1 0;
|
flex: 1 1 0;
|
||||||
|
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
z-index: 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_LeftPanel.collapsed .mx_BottomLeftMenu {
|
.mx_LeftPanel.collapsed .mx_BottomLeftMenu {
|
||||||
|
@ -46,7 +46,7 @@ limitations under the License.
|
|||||||
.mx_RoomSubList_label.mx_RoomSubList_fixed {
|
.mx_RoomSubList_label.mx_RoomSubList_fixed {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 2;
|
z-index: 4;
|
||||||
/* pointer-events: none; */
|
/* pointer-events: none; */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user