From 33a16b85e412abbf54f22d21feb97e876e5dd784 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Tue, 30 Jul 2019 21:52:22 +0900 Subject: Handle errors on loading settings The error on loading settings can occurs when the settings lose backward compatibility on version up, or the saved date is broken. The error is caught, then the script done fallback to default settings and notify it to user. --- src/background/usecases/VersionUseCase.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/background/usecases/VersionUseCase.ts') diff --git a/src/background/usecases/VersionUseCase.ts b/src/background/usecases/VersionUseCase.ts index 1d9ef8b..0ff0e9b 100644 --- a/src/background/usecases/VersionUseCase.ts +++ b/src/background/usecases/VersionUseCase.ts @@ -12,10 +12,8 @@ export default class VersionUseCase { notify(): Promise { let manifest = browser.runtime.getManifest(); - let title = `Vim Vixen ${manifest.version} has been installed`; - let message = 'Click here to see release notes'; let url = this.releaseNoteUrl(manifest.version); - return this.notifyPresenter.notify(title, message, () => { + return this.notifyPresenter.notifyUpdated(manifest.version, () => { this.tabPresenter.create(url); }); } -- cgit v1.2.3