From f14c2cf2b22ef92ac8988ff15cbdaea12eadf8f9 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 19 Oct 2018 12:46:59 +0200 Subject: [PATCH] don't hide empty sections that have a (+) button --- src/components/views/rooms/RoomList.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/views/rooms/RoomList.js b/src/components/views/rooms/RoomList.js index e4a9700ff9..ef82075e89 100644 --- a/src/components/views/rooms/RoomList.js +++ b/src/components/views/rooms/RoomList.js @@ -526,8 +526,9 @@ module.exports = React.createClass({ props = Object.assign({}, defaultProps, props); const isLast = i === subListsProps.length - 1; const len = props.list.length + (props.extraTiles ? props.extraTiles.length : 0); - if (!len) { - return components; //dont render + // empty and no add button? dont render + if (!len && !props.onAddRoom) { + return components; } const {key, label, ... otherProps} = props; const chosenKey = key || label;