aboutsummaryrefslogtreecommitdiffstats
path: root/src/models/Service.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/models/Service.js')
-rw-r--r--src/models/Service.js15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/models/Service.js b/src/models/Service.js
index c7276821a..dc53807f7 100644
--- a/src/models/Service.js
+++ b/src/models/Service.js
@@ -23,6 +23,7 @@ export default class Service {
23 @observable isNotificationEnabled = true; 23 @observable isNotificationEnabled = true;
24 @observable isIndirectMessageBadgeEnabled = true; 24 @observable isIndirectMessageBadgeEnabled = true;
25 @observable customIconUrl = ''; 25 @observable customIconUrl = '';
26 @observable hasCrashed = false;
26 27
27 constructor(data, recipe) { 28 constructor(data, recipe) {
28 if (!data) { 29 if (!data) {
@@ -118,14 +119,12 @@ export default class Service {
118 options, 119 options,
119 })); 120 }));
120 121
121 this.webview.addEventListener('crashed', (e) => { 122 this.webview.addEventListener('did-start-loading', () => {
122 console.log(e); 123 this.hasCrashed = false;
123 const reload = window.confirm('Service crashed. Reload?'); // eslint-disable-line no-alert 124 });
124 if (reload) { 125
125 store.actions.service.reload({ 126 this.webview.addEventListener('crashed', () => {
126 serviceId: this.id, 127 this.hasCrashed = true;
127 });
128 }
129 }); 128 });
130 } 129 }
131 130