1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-23 11:56:00 +01:00

rename sorts

This commit is contained in:
Kyle Spearrin 2017-10-16 23:21:12 -04:00
parent 65842a3dba
commit ea1ef54c95
2 changed files with 5 additions and 5 deletions

View File

@ -457,7 +457,7 @@ var bg_isBackground = true,
menuOptionsLoaded = [];
bg_cipherService.getAllDecryptedForDomain(tabDomain).then(function (logins) {
logins.sort(bg_cipherService.sortLoginsByLastUsedThenName);
logins.sort(bg_cipherService.sortCiphersByLastUsedThenName);
if (contextMenuEnabled) {
for (var i = 0; i < logins.length; i++) {

View File

@ -576,10 +576,10 @@ function initCipherService() {
return deferred.promise;
};
CipherService.prototype.sortLoginsByLastUsed = sortLoginsByLastUsed;
CipherService.prototype.sortCiphersByLastUsed = sortCiphersByLastUsed;
CipherService.prototype.sortLoginsByLastUsedThenName = function (a, b) {
var result = sortLoginsByLastUsed(a, b);
CipherService.prototype.sortCiphersByLastUsedThenName = function (a, b) {
var result = sortCiphersByLastUsed(a, b);
if (result !== 0) {
return result;
}
@ -597,7 +597,7 @@ function initCipherService() {
return 0;
};
function sortLoginsByLastUsed(a, b) {
function sortCiphersByLastUsed(a, b) {
var aLastUsed = a.localData && a.localData.lastUsedDate ? a.localData.lastUsedDate : null;
var bLastUsed = b.localData && b.localData.lastUsedDate ? b.localData.lastUsedDate : null;