@@ -82,7 +82,6 @@ var RoomSubList = React.createClass({
8282 incomingCall : React . PropTypes . object ,
8383 onShowMoreRooms : React . PropTypes . func ,
8484 searchFilter : React . PropTypes . string ,
85- emptyContent : React . PropTypes . node , // content shown if the list is empty
8685 } ,
8786
8887 getInitialState : function ( ) {
@@ -469,18 +468,16 @@ var RoomSubList = React.createClass({
469468
470469 render : function ( ) {
471470 var connectDropTarget = this . props . connectDropTarget ;
471+ var RoomDropTarget = sdk . getComponent ( 'rooms.RoomDropTarget' ) ;
472472 var TruncatedList = sdk . getComponent ( 'elements.TruncatedList' ) ;
473473
474474 var label = this . props . collapsed ? null : this . props . label ;
475475
476476 //console.log("render: " + JSON.stringify(this.state.sortedList));
477477
478- let content ;
479- if ( this . state . sortedList . length == 0 ) {
480- //content = <RoomDropTarget label={ 'Drop here to ' + this.props.verb }/>;
481- content = this . props . emptyContent ;
482- } else {
483- content = this . makeRoomTiles ( ) ;
478+ var target ;
479+ if ( this . state . sortedList . length == 0 && this . props . editable ) {
480+ target = < RoomDropTarget label = { 'Drop here to ' + this . props . verb } /> ;
484481 }
485482
486483 var roomCount = this . props . list . length > 0 ? this . props . list . length : '' ;
@@ -500,7 +497,8 @@ var RoomSubList = React.createClass({
500497 if ( ! this . state . hidden ) {
501498 subList = < TruncatedList className = { classes } truncateAt = { this . state . truncateAt }
502499 createOverflowElement = { this . _createOverflowTile } >
503- { content }
500+ { target }
501+ { this . makeRoomTiles ( ) }
504502 </ TruncatedList > ;
505503 }
506504 else {
0 commit comments