From 7d11b1699454366bf99e8e5033ba39b127687fcb Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Wed, 6 May 2015 04:55:22 +0100 Subject: Search completion; simplify messaging code. This eliminates the need to repeatedly install and remove listeners for @filterPort in the vomnibar. It also eleiminates the need for "keepAlive" in reponses. All as suggested by @mrmr1993 in #1635. --- background_scripts/completion.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'background_scripts/completion.coffee') diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee index 729e86ab..c91825b5 100644 --- a/background_scripts/completion.coffee +++ b/background_scripts/completion.coffee @@ -478,12 +478,12 @@ class MultiCompleter # (ie. a SearchEngineCompleter). This prevents hiding the vomnibar briefly before showing it # again, which looks ugly. unless shouldRunContinuation and suggestions.length == 0 - onComplete @prepareSuggestions(queryTerms, suggestions), keepAlive: shouldRunContinuation + onComplete @prepareSuggestions queryTerms, suggestions # Allow subsequent queries to begin. @filterInProgress = false if shouldRunContinuation continuation suggestions, (newSuggestions) => - onComplete @prepareSuggestions queryTerms, suggestions.concat(newSuggestions) + onComplete @prepareSuggestions queryTerms, suggestions.concat newSuggestions else @filter @mostRecentQuery.queryTerms, @mostRecentQuery.onComplete if @mostRecentQuery -- cgit v1.2.3