aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-09-06 05:43:54 +0530
committerLibravatar Vijay A <avijayr@protonmail.com>2021-09-06 05:43:54 +0530
commit82c00ce342fa1044e8faca965588e88f674937ac (patch)
tree2eb5a6286748236f39ae15bf9d92e299c4255ccb /src
parentdocs: add sad270 as a contributor for bug (#1872) [skip ci] (diff)
downloadferdium-app-82c00ce342fa1044e8faca965588e88f674937ac.tar.gz
ferdium-app-82c00ce342fa1044e8faca965588e88f674937ac.tar.zst
ferdium-app-82c00ce342fa1044e8faca965588e88f674937ac.zip
refactor: Removed old TODO. Added new TODO. [skip ci]
Diffstat (limited to 'src')
-rw-r--r--src/lib/Menu.js11
1 files changed, 4 insertions, 7 deletions
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({
323}); 323});
324 324
325function getActiveService() { 325function getActiveService() {
326 return window.ferdi.stores.services.active; 326 // TODO: How is this different from `this.actions.service.active` which is in the ServicesStore class?
327 return this.stores.services.active;
327} 328}
328 329
329const _titleBarTemplateFactory = (intl, locked) => [ 330const _titleBarTemplateFactory = (intl, locked) => [
@@ -656,18 +657,14 @@ export default class FranzMenu {
656 tpl[1].submenu.unshift( 657 tpl[1].submenu.unshift(
657 { 658 {
658 label: intl.formatMessage(menuItems.reloadService), 659 label: intl.formatMessage(menuItems.reloadService),
659 id: 'reloadService', // TODO: needed?
660 accelerator: `${cmdOrCtrlShortcutKey()}+R`, 660 accelerator: `${cmdOrCtrlShortcutKey()}+R`,
661 click: () => { 661 click: () => {
662 if ( 662 if (
663 this.stores.user.isLoggedIn && 663 this.stores.user.isLoggedIn &&
664 this.stores.services.enabled.length > 0 664 this.stores.services.enabled.length > 0
665 ) { 665 ) {
666 if ( 666 if (getActiveService().recipe.id === CUSTOM_WEBSITE_RECIPE_ID) {
667 this.stores.services.active.recipe.id === 667 getActiveService().webview.reload();
668 CUSTOM_WEBSITE_RECIPE_ID
669 ) {
670 this.stores.services.active.webview.reload();
671 } else { 668 } else {
672 this.actions.service.reloadActive(); 669 this.actions.service.reloadActive();
673 } 670 }