From 82c00ce342fa1044e8faca965588e88f674937ac Mon Sep 17 00:00:00 2001 From: Vijay A Date: Mon, 6 Sep 2021 05:43:54 +0530 Subject: refactor: Removed old TODO. Added new TODO. [skip ci] --- src/lib/Menu.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/lib/Menu.js') diff --git a/src/lib/Menu.js b/src/lib/Menu.js index 8844c0ae8..1843ca6c6 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js @@ -323,7 +323,8 @@ const menuItems = defineMessages({ }); function getActiveService() { - return window.ferdi.stores.services.active; + // TODO: How is this different from `this.actions.service.active` which is in the ServicesStore class? + return this.stores.services.active; } const _titleBarTemplateFactory = (intl, locked) => [ @@ -656,18 +657,14 @@ export default class FranzMenu { tpl[1].submenu.unshift( { label: intl.formatMessage(menuItems.reloadService), - id: 'reloadService', // TODO: needed? accelerator: `${cmdOrCtrlShortcutKey()}+R`, click: () => { if ( this.stores.user.isLoggedIn && this.stores.services.enabled.length > 0 ) { - if ( - this.stores.services.active.recipe.id === - CUSTOM_WEBSITE_RECIPE_ID - ) { - this.stores.services.active.webview.reload(); + if (getActiveService().recipe.id === CUSTOM_WEBSITE_RECIPE_ID) { + getActiveService().webview.reload(); } else { this.actions.service.reloadActive(); } -- cgit v1.2.3-54-g00ecf