From 5e293c0f4534e5066236327ef3d651614fa14780 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 5 Oct 2016 18:06:43 +0100 Subject: [PATCH] Don't stop paginating if no rooms match Always show the scrollpanel otherwise we stop paginating if there are no matching rooms in the first request (as per comment). Fixes no freenode rooms being shown. --- src/components/structures/RoomDirectory.js | 35 ++++++++++++---------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/src/components/structures/RoomDirectory.js b/src/components/structures/RoomDirectory.js index ca698e52c1..26ca858639 100644 --- a/src/components/structures/RoomDirectory.js +++ b/src/components/structures/RoomDirectory.js @@ -554,24 +554,29 @@ module.exports = React.createClass({ ; } else { const rows = this.getRows(); + // we still show the scrollpanel, at least for now, because + // otherwise we don't fetch more because we don't get a fill + // request from the scrollpanel because there isn't one + let scrollpanel_content; if (rows.length == 0) { - content = No rooms to show; + scrollpanel_content = No rooms to show; } else { - const ScrollPanel = sdk.getComponent("structures.ScrollPanel"); - content = - - - { this.getRows() } - -
-
; + scrollpanel_content = + + { this.getRows() } + +
; } + const ScrollPanel = sdk.getComponent("structures.ScrollPanel"); + content = + { scrollpanel_content } + ; } let placeholder = 'Search for a room';