1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-06 09:20:43 +01:00

installedVersionKey constant

This commit is contained in:
Kyle Spearrin 2018-02-16 15:50:23 -05:00
parent 7724fe6815
commit e0f90849fc

View File

@ -263,8 +263,7 @@ export default class RuntimeBackground {
private async checkOnInstalled() {
if (this.isSafari) {
const installedVersionKey = 'installedVersion';
const installedVersion = await this.storageService.get<string>(installedVersionKey);
const installedVersion = await this.storageService.get<string>(ConstantsService.installedVersionKey);
if (installedVersion == null) {
this.onInstalledReason = 'install';
} else if (BrowserApi.getApplicationVersion() !== installedVersion) {
@ -272,7 +271,8 @@ export default class RuntimeBackground {
}
if (this.onInstalledReason != null) {
await this.storageService.save(installedVersionKey, BrowserApi.getApplicationVersion());
await this.storageService.save(ConstantsService.installedVersionKey,
BrowserApi.getApplicationVersion());
}
}