Skip to content

Commit

Permalink
Merge pull request #2422 from vector-im/dbkr/fix_no_freenode_rooms
Browse files Browse the repository at this point in the history
Don't stop paginating if no rooms match
  • Loading branch information
richvdh committed Oct 6, 2016
2 parents cd7adfe + 5e293c0 commit f827a29
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions src/components/structures/RoomDirectory.js
Original file line number Diff line number Diff line change
Expand Up @@ -554,24 +554,29 @@ module.exports = React.createClass({
</div>;
} 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 = <i>No rooms to show</i>;
scrollpanel_content = <i>No rooms to show</i>;
} else {
const ScrollPanel = sdk.getComponent("structures.ScrollPanel");
content = <ScrollPanel ref={this.collectScrollPanel}
className="mx_RoomDirectory_tableWrapper"
onFillRequest={ this.onFillRequest }
stickyBottom={false}
startAtBottom={false}
onResize={function(){}}
>
<table ref="directory_table" className="mx_RoomDirectory_table">
<tbody>
{ this.getRows() }
</tbody>
</table>
</ScrollPanel>;
scrollpanel_content = <table ref="directory_table" className="mx_RoomDirectory_table">
<tbody>
{ this.getRows() }
</tbody>
</table>;
}
const ScrollPanel = sdk.getComponent("structures.ScrollPanel");
content = <ScrollPanel ref={this.collectScrollPanel}
className="mx_RoomDirectory_tableWrapper"
onFillRequest={ this.onFillRequest }
stickyBottom={false}
startAtBottom={false}
onResize={function(){}}
>
{ scrollpanel_content }
</ScrollPanel>;
}

let placeholder = 'Search for a room';
Expand Down

0 comments on commit f827a29

Please sign in to comment.