[PATCH 09 of 19] autocomplete: remove leftover 'cache' in PullRequestAutocomplete

Thomas De Schampheleire patrickdepinguin at gmail.com
Tue Jun 30 16:43:19 EDT 2015


# HG changeset patch
# User Thomas De Schampheleire <thomas.de.schampheleire at gmail.com>
# Date 1435349533 -7200
#      Fri Jun 26 22:12:13 2015 +0200
# Node ID d6d25547fc3ffc050212e5b4ec2c04478c6ebc03
# Parent  98519504e88827b408447efcb9ea01ca270a7b0b
autocomplete: remove leftover 'cache' in PullRequestAutocomplete

The cache array is no longer used, only written to, and can thus be removed.

diff --git a/kallithea/public/js/base.js b/kallithea/public/js/base.js
--- a/kallithea/public/js/base.js
+++ b/kallithea/public/js/base.js
@@ -1458,9 +1458,6 @@ var PullRequestAutoComplete = function (
 
     reviewerAC.formatResult = autocompleteFormatter;
 
-    //members cache to catch duplicates
-    reviewerAC.dataSource.cache = [];
-
     // Handler for selection of an entry
     reviewerAC.itemSelectEvent.subscribe(function (sType, aArgs) {
         var myAC = aArgs[0]; // reference back to the AC instance
@@ -1469,7 +1466,6 @@ var PullRequestAutoComplete = function (
 
         addReviewMember(oData.id, oData.fname, oData.lname, oData.nname,
                         oData.gravatar_lnk, oData.gravatar_size);
-        myAC.dataSource.cache.push(oData.id);
         $('#user').val('');
     });
 }


More information about the kallithea-general mailing list