Menu context dohickey now sticks when menu shown

This commit is contained in:
wmwragg 2016-07-25 17:18:45 +01:00
parent a218b4e8a3
commit 9c9c5ec458

View file

@ -86,16 +86,10 @@ module.exports = React.createClass({
top: y, top: y,
room: this.props.room, room: this.props.room,
onFinished: function() { onFinished: function() {
self.setState({ self.setState({ menu: false });
menu: false,
badgeHover: false,
});
} }
}); });
this.setState({ this.setState({ menu: true });
menu: true,
badgeHover: true,
});
}, },
render: function() { render: function() {
@ -113,6 +107,7 @@ module.exports = React.createClass({
'mx_RoomTile_read': !(this.props.highlight || notificationCount > 0), 'mx_RoomTile_read': !(this.props.highlight || notificationCount > 0),
'mx_RoomTile_highlight': this.props.highlight, 'mx_RoomTile_highlight': this.props.highlight,
'mx_RoomTile_invited': (me && me.membership == 'invite'), 'mx_RoomTile_invited': (me && me.membership == 'invite'),
'mx_RoomTile_menu': this.state.menu,
}); });
// XXX: We should never display raw room IDs, but sometimes the // XXX: We should never display raw room IDs, but sometimes the
@ -128,7 +123,7 @@ module.exports = React.createClass({
'mx_RoomTile_badgeButton': this.state.badgeHover, 'mx_RoomTile_badgeButton': this.state.badgeHover,
}); });
if (this.state.badgeHover) { if (this.state.badgeHover || this.state.menu) {
badgeContent = "\u00B7\u00B7\u00B7"; badgeContent = "\u00B7\u00B7\u00B7";
} else if (this.props.highlight || notificationCount > 0) { } else if (this.props.highlight || notificationCount > 0) {
var limitedCount = (notificationCount > 99) ? '99+' : notificationCount; var limitedCount = (notificationCount > 99) ? '99+' : notificationCount;