Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.subscribe((syncStatus) => {
switch (syncStatus) {
case SyncStatus.CHECKING_FOR_UPDATE:
notificationObject.text = "Checking for updates..."
this.localNotifications.schedule(notificationObject);
break;
case SyncStatus.INSTALLING_UPDATE:
notificationObject.text = "Installing update...";
notificationObject["progressBar"] = { value: 100 };
this.localNotifications.update(notificationObject);
break;
case SyncStatus.UP_TO_DATE:
case SyncStatus.ERROR:
case SyncStatus.UPDATE_IGNORED:
case SyncStatus.UPDATE_INSTALLED:
this.localNotifications.cancel(notificationObject.id);
break;
}
});
}