aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/ServicesStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r--src/stores/ServicesStore.js16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js
index 5b70ca271..84f84891a 100644
--- a/src/stores/ServicesStore.js
+++ b/src/stores/ServicesStore.js
@@ -1,5 +1,8 @@
1import { 1import {
2 action, reaction, computed, observable, 2 action,
3 reaction,
4 computed,
5 observable,
3} from 'mobx'; 6} from 'mobx';
4import { debounce, remove } from 'lodash'; 7import { debounce, remove } from 'lodash';
5 8
@@ -323,7 +326,11 @@ export default class ServicesStore extends Store {
323 service.webview = webview; 326 service.webview = webview;
324 327
325 if (!service.isAttached) { 328 if (!service.isAttached) {
326 service.initializeWebViewEvents(this); 329 debug('Webview is not attached, initializing');
330 service.initializeWebViewEvents({
331 handleIPCMessage: this.actions.service.handleIPCMessage,
332 openWindow: this.actions.service.openWindow,
333 });
327 service.initializeWebViewListener(); 334 service.initializeWebViewListener();
328 } 335 }
329 336
@@ -644,14 +651,15 @@ export default class ServicesStore extends Store {
644 const service = this.one(serviceId); 651 const service = this.one(serviceId);
645 652
646 if (service.webview) { 653 if (service.webview) {
647 service.webview.send('initialize-recipe', service); 654 debug('Initialize recipe', service.recipe.id, service.name);
655 service.webview.send('initialize-recipe', service.shareWithWebview, service.recipe);
648 } 656 }
649 } 657 }
650 658
651 _initRecipePolling(serviceId) { 659 _initRecipePolling(serviceId) {
652 const service = this.one(serviceId); 660 const service = this.one(serviceId);
653 661
654 const delay = 1000; 662 const delay = 2000;
655 663
656 if (service) { 664 if (service) {
657 if (service.timer !== null) { 665 if (service.timer !== null) {