diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index e7b97021df..d7d3d5988c 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -521,6 +521,7 @@ module.exports = React.createClass({ searchResults: [], searchHighlights: [], searchCount: null, + searchCanPaginate: null, }); this.savedSearchScrollState = {atBottom: true}; @@ -579,6 +580,7 @@ module.exports = React.createClass({ searchHighlights: highlights, searchResults: events, searchCount: results.count, + searchCanPaginate: !!(results.next_batch), }); self.nextSearchBatch = results.next_batch; }, function(error) { @@ -639,6 +641,20 @@ module.exports = React.createClass({ var lastRoomId; + if (this.state.searchCanPaginate === false) { + if (this.state.searchResults.length == 0) { + ret.push(
  • +

    No results

    +
  • + ); + } else { + ret.push(
  • +

    No more results

    +
  • + ); + } + } + for (var i = this.state.searchResults.length - 1; i >= 0; i--) { var result = this.state.searchResults[i]; var mxEv = new Matrix.MatrixEvent(result.result);