diff options
author | Marius David Wieschollek <passwords.public@mdns.eu> | 2021-01-12 19:59:50 +0300 |
---|---|---|
committer | Marius David Wieschollek <passwords.public@mdns.eu> | 2021-01-12 19:59:50 +0300 |
commit | 7273a05f196fbb1378dc054108ee11a2649248fb (patch) | |
tree | 235eb946e7eed05bec88ece415c07e9cf1e1fd07 /src/js | |
parent | b359236801b910fd7961645faf9fd22612533dcf (diff) | |
parent | df0c9a8de01a01d00c67884c7beca49ba59147c5 (diff) |
Merge branch '2.0.1'
Diffstat (limited to 'src/js')
-rw-r--r-- | src/js/Manager/MiningManager.js | 4 | ||||
-rw-r--r-- | src/js/Services/NotificationService.js | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/js/Manager/MiningManager.js b/src/js/Manager/MiningManager.js index 3047bb5..377dd8a 100644 --- a/src/js/Manager/MiningManager.js +++ b/src/js/Manager/MiningManager.js @@ -107,8 +107,8 @@ class MiningManager { */ async processTask(task) { try { - if(task.isNew() && !task.isManual()) NotificationService.newPasswordNotification(task); - if(!task.isNew() && !task.isManual()) NotificationService.updatePasswordNotification(task); + if(task.isNew() && !task.isManual()) NotificationService.newPasswordNotification(task).catch(ErrorManager.catchEvt); + if(!task.isNew() && !task.isManual()) NotificationService.updatePasswordNotification(task).catch(ErrorManager.catchEvt); task = await this._miningQueue.push(task); if(task.isDiscarded()) { diff --git a/src/js/Services/NotificationService.js b/src/js/Services/NotificationService.js index cf93bee..7ef0b62 100644 --- a/src/js/Services/NotificationService.js +++ b/src/js/Services/NotificationService.js @@ -26,12 +26,12 @@ class NotificationService { /** * * @param {MiningItem} item - * @return {NewPasswordNotification} + * @return {Promise<NewPasswordNotification>} */ - newPasswordNotification(item) { + async newPasswordNotification(item) { let notification = new NewPasswordNotification(item); - if(SettingsService.getValue('notification.password.new')) { + if(await SettingsService.getValue('notification.password.new')) { this._sendNotification(notification); } @@ -41,12 +41,12 @@ class NotificationService { /** * * @param {MiningItem} item - * @return {NewPasswordNotification} + * @return {Promise<UpdatePasswordNotification>} */ - updatePasswordNotification(item) { + async updatePasswordNotification(item) { let notification = new UpdatePasswordNotification(item); - if(SettingsService.getValue('notification.password.update')) { + if(await SettingsService.getValue('notification.password.update')) { this._sendNotification(notification); } |