From 2469be543048b575c0cd8e8fccdef2a73e6046d3 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Thu, 17 Oct 2019 14:57:57 +0200 Subject: Add debugging logs --- src/webview/lib/RecipeWebview.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/webview/lib') diff --git a/src/webview/lib/RecipeWebview.js b/src/webview/lib/RecipeWebview.js index be29142af..e3212d0e6 100644 --- a/src/webview/lib/RecipeWebview.js +++ b/src/webview/lib/RecipeWebview.js @@ -2,6 +2,8 @@ const { ipcRenderer } = require('electron'); const fs = require('fs-extra'); +const debug = require('debug')('Franz:Plugin:RecipeWebview'); + class RecipeWebview { constructor() { this.countCache = { @@ -11,6 +13,8 @@ class RecipeWebview { ipcRenderer.on('poll', () => { this.loopFunc(); + + debug('Poll event'); }); } @@ -44,8 +48,11 @@ class RecipeWebview { indirect: indirect > 0 ? indirect : 0, }; + ipcRenderer.sendToHost('messages', count); Object.assign(this.countCache, count); + + debug('Sending badge count to host', count); } /** @@ -61,6 +68,8 @@ class RecipeWebview { styles.innerHTML = data.toString(); document.querySelector('head').appendChild(styles); + + debug('Append styles', styles); }); } -- cgit v1.2.3-54-g00ecf From 9e92cff901522f438c34543836a8c2dc6578f5c1 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Fri, 18 Oct 2019 12:00:51 +0200 Subject: remove flow tag --- src/webview/lib/RecipeWebview.js | 1 - 1 file changed, 1 deletion(-) (limited to 'src/webview/lib') diff --git a/src/webview/lib/RecipeWebview.js b/src/webview/lib/RecipeWebview.js index e3212d0e6..859f7787f 100644 --- a/src/webview/lib/RecipeWebview.js +++ b/src/webview/lib/RecipeWebview.js @@ -1,4 +1,3 @@ -// @flow const { ipcRenderer } = require('electron'); const fs = require('fs-extra'); -- cgit v1.2.3-54-g00ecf