Revert commits acciderntally put on develop

This commit is contained in:
David Baker 2017-04-28 11:22:05 +01:00
parent 73fb2c859e
commit 4eb0ca63a9
2 changed files with 6 additions and 26 deletions

View file

@ -82,7 +82,6 @@ var RoomSubList = React.createClass({
incomingCall: React.PropTypes.object,
onShowMoreRooms: React.PropTypes.func,
searchFilter: React.PropTypes.string,
emptyContent: React.PropTypes.node, // content shown if the list is empty
},
getInitialState: function() {
@ -469,18 +468,16 @@ var RoomSubList = React.createClass({
render: function() {
var connectDropTarget = this.props.connectDropTarget;
var RoomDropTarget = sdk.getComponent('rooms.RoomDropTarget');
var TruncatedList = sdk.getComponent('elements.TruncatedList');
var label = this.props.collapsed ? null : this.props.label;
//console.log("render: " + JSON.stringify(this.state.sortedList));
let content;
if (this.state.sortedList.length == 0) {
//content = <RoomDropTarget label={ 'Drop here to ' + this.props.verb }/>;
content = this.props.emptyContent;
} else {
content = this.makeRoomTiles();
var target;
if (this.state.sortedList.length == 0 && this.props.editable) {
target = <RoomDropTarget label={ 'Drop here to ' + this.props.verb }/>;
}
var roomCount = this.props.list.length > 0 ? this.props.list.length : '';
@ -500,7 +497,8 @@ var RoomSubList = React.createClass({
if (!this.state.hidden) {
subList = <TruncatedList className={ classes } truncateAt={this.state.truncateAt}
createOverflowElement={this._createOverflowTile} >
{ content }
{ target }
{ this.makeRoomTiles() }
</TruncatedList>;
}
else {