Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1726)

Unified Diff: chrome/browser/resources/md_downloads/crisper.js

Issue 2284463002: MD Downloads: fix search spinner when terms are the same (Closed)
Patch Set: tsergeant@ review / test fix Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/md_downloads/crisper.js
diff --git a/chrome/browser/resources/md_downloads/crisper.js b/chrome/browser/resources/md_downloads/crisper.js
index 81c71e18c73961bafa50cbaa71c7c61aca58692e..28697f1d74e84446d5b49ae58e13a4634cffcc1a 100644
--- a/chrome/browser/resources/md_downloads/crisper.js
+++ b/chrome/browser/resources/md_downloads/crisper.js
@@ -2250,9 +2250,10 @@ cr.define('downloads', function() {
for (var i = 0; sameTerms && i < searchTerms.length; ++i) {
if (searchTerms[i] != this.searchTerms_[i]) sameTerms = false;
}
- if (sameTerms) return;
+ if (sameTerms) return false;
this.searchTerms_ = searchTerms;
this.loadMore();
+ return true;
},
show: chromeSendWithId('show'),
undo: chrome.send.bind(chrome, 'undo')
@@ -6802,8 +6803,7 @@ cr.define('downloads', function() {
},
onSearchChanged_: function(event) {
var actionService = downloads.ActionService.getInstance();
- actionService.search(event.detail);
- this.spinnerActive = actionService.isSearching();
+ if (actionService.search(event.detail)) this.spinnerActive = actionService.isSearching();
this.updateClearAll_();
},
onOpenDownloadsFolderTap_: function() {

Powered by Google App Engine
This is Rietveld 408576698