Merge pull request #25310 from owncloud/search-preventinfiniteloop
Prevent infinite loop in search auto-nextpage
This commit is contained in:
commit
22746990e6
|
@ -2352,13 +2352,16 @@
|
||||||
*/
|
*/
|
||||||
setFilter:function(filter) {
|
setFilter:function(filter) {
|
||||||
var total = 0;
|
var total = 0;
|
||||||
|
if (this._filter === filter) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this._filter = filter;
|
this._filter = filter;
|
||||||
this.fileSummary.setFilter(filter, this.files);
|
this.fileSummary.setFilter(filter, this.files);
|
||||||
total = this.fileSummary.getTotal();
|
total = this.fileSummary.getTotal();
|
||||||
if (!this.$el.find('.mask').exists()) {
|
if (!this.$el.find('.mask').exists()) {
|
||||||
this.hideIrrelevantUIWhenNoFilesMatch();
|
this.hideIrrelevantUIWhenNoFilesMatch();
|
||||||
}
|
}
|
||||||
var that = this;
|
|
||||||
var visibleCount = 0;
|
var visibleCount = 0;
|
||||||
filter = filter.toLowerCase();
|
filter = filter.toLowerCase();
|
||||||
|
|
||||||
|
@ -2378,7 +2381,7 @@
|
||||||
if (visibleCount < total) {
|
if (visibleCount < total) {
|
||||||
$trs = this._nextPage(false);
|
$trs = this._nextPage(false);
|
||||||
}
|
}
|
||||||
} while (visibleCount < total);
|
} while (visibleCount < total && $trs.length > 0);
|
||||||
|
|
||||||
this.$container.trigger('scroll');
|
this.$container.trigger('scroll');
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue