diff options
author | 2021-09-05 15:14:28 +0530 | |
---|---|---|
committer | 2021-09-05 18:00:26 +0530 | |
commit | a57a4edcb648d025254ede4d18d267b887ad0b8b (patch) | |
tree | c8b75e58cf108a55608f729218885abdb07fd42d /recipes/slack/webview.js | |
parent | Add ability to use self-hosted option for 'youtrack' service (fixes #671) (diff) | |
download | ferdium-recipes-a57a4edcb648d025254ede4d18d267b887ad0b8b.tar.gz ferdium-recipes-a57a4edcb648d025254ede4d18d267b887ad0b8b.tar.zst ferdium-recipes-a57a4edcb648d025254ede4d18d267b887ad0b8b.zip |
Remove dependency on 'require' of 'electron' and 'electron/remote' modules.
Instead, use the exposed content from the recipe model in main ferdi.
Diffstat (limited to 'recipes/slack/webview.js')
-rw-r--r-- | recipes/slack/webview.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/recipes/slack/webview.js b/recipes/slack/webview.js index b8e3817..1a12e80 100644 --- a/recipes/slack/webview.js +++ b/recipes/slack/webview.js | |||
@@ -1,5 +1,3 @@ | |||
1 | const _electron = require('electron'); | ||
2 | |||
3 | const _path = _interopRequireDefault(require('path')); | 1 | const _path = _interopRequireDefault(require('path')); |
4 | 2 | ||
5 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | 3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
@@ -27,7 +25,7 @@ const getTeamIcon = function getTeamIcon(count = 0) { | |||
27 | countTeamIconCheck += 1; | 25 | countTeamIconCheck += 1; |
28 | 26 | ||
29 | if (bgUrl) { | 27 | if (bgUrl) { |
30 | _electron.ipcRenderer.sendToHost('avatar', bgUrl); | 28 | Ferdi.ipcRenderer.sendToHost('avatar', bgUrl); |
31 | } else if (countTeamIconCheck <= 5) { | 29 | } else if (countTeamIconCheck <= 5) { |
32 | setTimeout(() => { | 30 | setTimeout(() => { |
33 | getTeamIcon(countTeamIconCheck + 1); | 31 | getTeamIcon(countTeamIconCheck + 1); |