From 53f675fbe01ec11f5d6b01273f7d297ade7fd2de Mon Sep 17 00:00:00 2001 From: hristoterezov Date: Wed, 26 Jul 2017 16:21:52 -0500 Subject: [PATCH] ref(ToolbarButton): Remove unnecessary check. --- .../toolbox/components/ToolbarButton.web.js | 43 ++++++++----------- 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/react/features/toolbox/components/ToolbarButton.web.js b/react/features/toolbox/components/ToolbarButton.web.js index 8922ea9e1..778d445ea 100644 --- a/react/features/toolbox/components/ToolbarButton.web.js +++ b/react/features/toolbox/components/ToolbarButton.web.js @@ -10,10 +10,7 @@ import { } from '../../../../modules/UI/util/Tooltip'; import AbstractToolbarButton from './AbstractToolbarButton'; -import { - getButtonAttributesByProps, - isButtonEnabled -} from '../functions'; +import { getButtonAttributesByProps } from '../functions'; declare var APP: Object; @@ -211,30 +208,26 @@ class ToolbarButton extends AbstractToolbarButton { */ _setShortcutAndTooltip(): void { const { button, tooltipPosition } = this.props; - const name = button.buttonName; - if (isButtonEnabled(name)) { - - if (!button.unclickable) { - if (button.tooltipText) { - setTooltipText(this.button, - button.tooltipText, - tooltipPosition); - } else { - setTooltip(this.button, - button.tooltipKey, - tooltipPosition); - } + if (!button.unclickable) { + if (button.tooltipText) { + setTooltipText(this.button, + button.tooltipText, + tooltipPosition); + } else { + setTooltip(this.button, + button.tooltipKey, + tooltipPosition); } + } - if (button.shortcut && APP && APP.keyboardshortcut) { - APP.keyboardshortcut.registerShortcut( - button.shortcut, - button.shortcutAttr, - button.shortcutFunc, - button.shortcutDescription - ); - } + if (button.shortcut && APP && APP.keyboardshortcut) { + APP.keyboardshortcut.registerShortcut( + button.shortcut, + button.shortcutAttr, + button.shortcutFunc, + button.shortcutDescription + ); } } }