mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-23 11:56:00 +01:00
bug fix + added launch time to view component (#178)
This commit is contained in:
parent
26d40d4c43
commit
b5cc5409ff
@ -196,11 +196,15 @@ export class ViewComponent implements OnDestroy, OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
launch(uri: LoginUriView) {
|
||||
launch(uri: LoginUriView, cipherId?: string) {
|
||||
if (!uri.canLaunch) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (cipherId) {
|
||||
this.cipherService.updateLastLaunchedDate(cipherId);
|
||||
}
|
||||
|
||||
this.platformUtilsService.eventTrack('Launched Login URI');
|
||||
this.platformUtilsService.launchUri(uri.launchUri);
|
||||
}
|
||||
|
@ -57,7 +57,8 @@ class Ciphers {
|
||||
}
|
||||
|
||||
getLastLaunched() {
|
||||
const sortedCiphers = this.ciphers.sort((x, y) => y.localData?.lastLaunched?.valueOf() - x.localData?.lastLaunched?.valueOf());
|
||||
const usedCiphers = this.ciphers.filter(cipher => cipher.localData?.lastLaunched)
|
||||
const sortedCiphers = usedCiphers.sort((x, y) => y.localData.lastLaunched.valueOf() - x.localData.lastLaunched.valueOf());
|
||||
return sortedCiphers[0];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user