Merge remote-tracking branch 'origin/develop' into matthew/status

This commit is contained in:
Matthew Hodgson 2017-11-08 04:29:44 -08:00
commit d4128af224
12 changed files with 127 additions and 18 deletions

View file

@ -127,8 +127,9 @@ module.exports = React.createClass({
},
_initGroupStore(groupId) {
if (!groupId) return;
this._groupStore = GroupStoreCache.getGroupStore(
this.context.matrixClient, this.props.groupId,
this.context.matrixClient, groupId,
);
this._groupStore.registerListener(this.onGroupStoreUpdated);
},

View file

@ -19,13 +19,16 @@ limitations under the License.
var React = require('react');
var ReactDOM = require('react-dom');
var dis = require('matrix-react-sdk/lib/dispatcher');
import classNames from 'classnames';
module.exports = React.createClass({
displayName: 'RoomTooltip',
propTypes: {
// Alllow the tooltip to be styled by the parent element
// Class applied to the element used to position the tooltip
className: React.PropTypes.string.isRequired,
// Class applied to the tooltip itself
tooltipClassName: React.PropTypes.string,
// The tooltip is derived from either the room name or a label
room: React.PropTypes.object,
label: React.PropTypes.string,
@ -69,8 +72,12 @@ module.exports = React.createClass({
style.left = 6 + parent.getBoundingClientRect().right + window.pageXOffset;
style.display = "block";
const tooltipClasses = classNames(
"mx_RoomTooltip", this.props.tooltipClassName,
);
var tooltip = (
<div className="mx_RoomTooltip" style={style} >
<div className={tooltipClasses} style={style} >
<div className="mx_RoomTooltip_chevron"></div>
{ label }
</div>