From c1fa89972a0ce18b8419f77c5680dd8d02ebed42 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Sun, 20 Mar 2016 23:51:43 +0000 Subject: [PATCH] Show a spinner when we back-paginate search results Hook into the existing searchInProgress state to show a spinner when we back-paginate search. --- src/components/structures/RoomView.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 409882f5e4..c945c59907 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -730,6 +730,8 @@ module.exports = React.createClass({ getSearchResultTiles: function() { var EventTile = sdk.getComponent('rooms.EventTile'); var SearchResultTile = sdk.getComponent('rooms.SearchResultTile'); + var Spinner = sdk.getComponent("elements.Spinner"); + var cli = MatrixClientPeg.get(); // XXX: todo: merge overlapping results somehow? @@ -742,6 +744,12 @@ module.exports = React.createClass({ var ret = []; + if (this.state.searchInProgress) { + ret.push(
  • + +
  • ); + } + if (!this.state.searchResults.next_batch) { if (this.state.searchResults.results.length == 0) { ret.push(