aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/ServicesStore.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2019-02-01 10:35:18 +0100
committerLibravatar Stefan Malzner <stefan@adlk.io>2019-02-01 10:35:18 +0100
commitda92cd426cbf350313945e3459f96638a79bd44e (patch)
tree931d18bbf62854366ccf7021d6206de7e0c42636 /src/stores/ServicesStore.js
parentUpdate stale.yml (diff)
parentb23 (diff)
downloadferdium-app-da92cd426cbf350313945e3459f96638a79bd44e.tar.gz
ferdium-app-da92cd426cbf350313945e3459f96638a79bd44e.tar.zst
ferdium-app-da92cd426cbf350313945e3459f96638a79bd44e.zip
Merge branch 'develop'v5.0.0-beta.23
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 a618da547..f79197c38 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
@@ -324,7 +327,11 @@ export default class ServicesStore extends Store {
324 service.webview = webview; 327 service.webview = webview;
325 328
326 if (!service.isAttached) { 329 if (!service.isAttached) {
327 service.initializeWebViewEvents(this); 330 debug('Webview is not attached, initializing');
331 service.initializeWebViewEvents({
332 handleIPCMessage: this.actions.service.handleIPCMessage,
333 openWindow: this.actions.service.openWindow,
334 });
328 service.initializeWebViewListener(); 335 service.initializeWebViewListener();
329 } 336 }
330 337
@@ -659,14 +666,15 @@ export default class ServicesStore extends Store {
659 const service = this.one(serviceId); 666 const service = this.one(serviceId);
660 667
661 if (service.webview) { 668 if (service.webview) {
662 service.webview.send('initialize-recipe', service); 669 debug('Initialize recipe', service.recipe.id, service.name);
670 service.webview.send('initialize-recipe', service.shareWithWebview, service.recipe);
663 } 671 }
664 } 672 }
665 673
666 _initRecipePolling(serviceId) { 674 _initRecipePolling(serviceId) {
667 const service = this.one(serviceId); 675 const service = this.one(serviceId);
668 676
669 const delay = 1000; 677 const delay = 2000;
670 678
671 if (service) { 679 if (service) {
672 if (service.timer !== null) { 680 if (service.timer !== null) {