Show a spinner when we back-paginate search results
Hook into the existing searchInProgress state to show a spinner when we back-paginate search.pull/21833/head
parent
eadd2a522f
commit
c1fa89972a
|
@ -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(<li key="search-spinner">
|
||||
<Spinner />
|
||||
</li>);
|
||||
}
|
||||
|
||||
if (!this.state.searchResults.next_batch) {
|
||||
if (this.state.searchResults.results.length == 0) {
|
||||
ret.push(<li key="search-top-marker">
|
||||
|
|
Loading…
Reference in New Issue