Fix slight mis-merge
We need to return 'true' from our promise of search result pagination. Also inline _backPaginateSearch which mostly served to confuse, and use debuglog instead of checking DEBUG_SCROLLpull/21833/head
parent
583d35e39f
commit
4730179c26
|
@ -366,7 +366,9 @@ module.exports = React.createClass({
|
|||
|
||||
if (this.state.searchResults.next_batch) {
|
||||
debuglog("requesting more search results");
|
||||
return this._backPaginateSearch();
|
||||
var searchPromise = MatrixClientPeg.get().backPaginateRoomEventsSearch(
|
||||
this.state.searchResults);
|
||||
return this._handleSearchResult(searchPromise);
|
||||
} else {
|
||||
debuglog("no more search results");
|
||||
return q(false);
|
||||
|
@ -511,7 +513,7 @@ module.exports = React.createClass({
|
|||
};
|
||||
}
|
||||
|
||||
if (DEBUG_SCROLL) console.log("sending search request");
|
||||
debuglog("sending search request");
|
||||
|
||||
var searchPromise = MatrixClientPeg.get().searchRoomEvents({
|
||||
filter: filter,
|
||||
|
@ -520,14 +522,6 @@ module.exports = React.createClass({
|
|||
this._handleSearchResult(searchPromise).done();
|
||||
},
|
||||
|
||||
_backPaginateSearch: function() {
|
||||
if (DEBUG_SCROLL) console.log("sending search back-paginate request");
|
||||
|
||||
var searchPromise = MatrixClientPeg.get().backPaginateRoomEventsSearch(
|
||||
this.state.searchResults);
|
||||
return this._handleSearchResult(searchPromise);
|
||||
},
|
||||
|
||||
_handleSearchResult: function(searchPromise) {
|
||||
var self = this;
|
||||
|
||||
|
|
Loading…
Reference in New Issue