diff --git a/src/skins/vector/css/organisms/RoomSubList.css b/src/skins/vector/css/organisms/RoomSubList.css index 43f453fb54..0580f574e3 100644 --- a/src/skins/vector/css/organisms/RoomSubList.css +++ b/src/skins/vector/css/organisms/RoomSubList.css @@ -30,3 +30,7 @@ limitations under the License. margin-top: 8px; margin-bottom: 4px; } + +.mx_RoomSubList_chevron { + padding-left: 5px; +} \ No newline at end of file diff --git a/src/skins/vector/views/organisms/RoomSubList.js b/src/skins/vector/views/organisms/RoomSubList.js index 27cfb2ae52..47e412f3e2 100644 --- a/src/skins/vector/views/organisms/RoomSubList.js +++ b/src/skins/vector/views/organisms/RoomSubList.js @@ -58,6 +58,7 @@ var RoomSubList = React.createClass({ getInitialState: function() { return { + hidden: false, sortedList: [], }; }, @@ -71,6 +72,10 @@ var RoomSubList = React.createClass({ this.sortList(newProps.list, newProps.order); }, + onClick: function(ev) { + this.setState({ hidden : !this.state.hidden }); + }, + tsOfNewestEvent: function(room) { if (room.timeline.length) { return room.timeline[room.timeline.length - 1].getTs(); @@ -229,14 +234,22 @@ var RoomSubList = React.createClass({ target = ; } + var subList; + if (!this.state.hidden) { + subList =
+ { target } + { this.makeRoomTiles() } +
; + } + + if (this.state.sortedList.length > 0 || this.props.editable) { return connectDropTarget(
-

{ this.props.collapsed ? '' : this.props.label }

-
- { target } - { this.makeRoomTiles() } -
+

{ this.props.collapsed ? '' : this.props.label } + +

+ { subList }
); }