The tooltip now appears even when not collapsed when hover over the avater, to allow the full name to be shown

pull/21833/head
wmwragg 2016-07-22 14:58:09 +01:00
parent ca75d93434
commit 6984a55b11
1 changed files with 7 additions and 0 deletions

View File

@ -114,6 +114,7 @@ module.exports = React.createClass({
badge = <div className={ badgeClasses } onMouseEnter={this.badgeOnMouseEnter} onMouseLeave={this.badgeOnMouseLeave}>{ badgeContent }</div>;
var label;
var tooltip;
if (!this.props.collapsed) {
var className = 'mx_RoomTile_name' + (this.props.isInvite ? ' mx_RoomTile_invite' : '');
let nameHTML = emojifyText(name);
@ -123,6 +124,11 @@ module.exports = React.createClass({
} else {
label = <div onMouseEnter={this.badgeOnMouseEnter} onMouseLeave={this.badgeOnMouseLeave} className={ className } dangerouslySetInnerHTML={nameHTML}></div>;
}
if (this.state.hover) {
var RoomTooltip = sdk.getComponent("rooms.RoomTooltip");
tooltip = <RoomTooltip room={this.props.room}/>;
}
}
else if (this.state.hover) {
var RoomTooltip = sdk.getComponent("rooms.RoomTooltip");
@ -151,6 +157,7 @@ module.exports = React.createClass({
{ label }
{ badge }
{ incomingCallBox }
{ tooltip }
</div>
));
}