mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
New method to update the last used index (#184)
Instead of updating it every time you call getNext(), it will be updated in a separate call, to avoid updating the index when the cipher did not auto-fill correctly (e.g wrong frame) Fixes #1392
This commit is contained in:
@@ -456,6 +456,10 @@ export class CipherService implements CipherServiceAbstraction {
|
||||
return this.getCipherForUrl(url, false, false);
|
||||
}
|
||||
|
||||
updateLastUsedIndexForUrl(url: string) {
|
||||
this.sortedCiphersCache.updateLastUsedIndex(url);
|
||||
}
|
||||
|
||||
async updateLastUsedDate(id: string): Promise<void> {
|
||||
let ciphersLocalData = await this.storageService.get<any>(Keys.localData);
|
||||
if (!ciphersLocalData) {
|
||||
@@ -1055,8 +1059,7 @@ export class CipherService implements CipherServiceAbstraction {
|
||||
return this.sortedCiphersCache.getLastLaunched(url);
|
||||
} else if (lastUsed) {
|
||||
return this.sortedCiphersCache.getLastUsed(url);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return this.sortedCiphersCache.getNext(url);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user