You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-08-15 05:42:19 +03:00
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_SCROLL
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user