aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/services/tabs
diff options
context:
space:
mode:
authorLibravatar Vijay A <vraravam@users.noreply.github.com>2024-04-19 09:02:56 +0530
committerLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2024-04-19 03:52:01 +0000
commit03a12413d632a2a1613091e44c52ce46b4adc5b8 (patch)
tree0086e0f98a644df91644b9cdde5ca1515188113a /src/components/services/tabs
parent6.7.3-nightly.13 [skip ci] (diff)
downloadferdium-app-03a12413d632a2a1613091e44c52ce46b4adc5b8.tar.gz
ferdium-app-03a12413d632a2a1613091e44c52ce46b4adc5b8.tar.zst
ferdium-app-03a12413d632a2a1613091e44c52ce46b4adc5b8.zip
Minor refactoring to move repeated code into utility class
Diffstat (limited to 'src/components/services/tabs')
-rw-r--r--src/components/services/tabs/TabItem.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/services/tabs/TabItem.tsx b/src/components/services/tabs/TabItem.tsx
index bf193e136..0e999506a 100644
--- a/src/components/services/tabs/TabItem.tsx
+++ b/src/components/services/tabs/TabItem.tsx
@@ -19,7 +19,7 @@ import globalMessages from '../../../i18n/globalMessages';
19import type Service from '../../../models/Service'; 19import type Service from '../../../models/Service';
20import Icon from '../../ui/icon'; 20import Icon from '../../ui/icon';
21import MenuItemConstructorOptions = Electron.MenuItemConstructorOptions; 21import MenuItemConstructorOptions = Electron.MenuItemConstructorOptions;
22import { acceleratorString } from '../../../jsUtils'; 22import { acceleratorString, isShiftKeyPress } from '../../../jsUtils';
23 23
24const IS_SERVICE_DEBUGGING_ENABLED = ( 24const IS_SERVICE_DEBUGGING_ENABLED = (
25 localStorage.getItem('debug') || '' 25 localStorage.getItem('debug') || ''
@@ -171,8 +171,8 @@ class TabItem extends Component<IProps, IState> {
171 ); 171 );
172 } 172 }
173 173
174 handleShortcutIndex = (event, showShortcutIndex = true) => { 174 handleShortcutIndex = (event: KeyboardEvent, showShortcutIndex = true) => {
175 if (event.key === 'Shift') { 175 if (isShiftKeyPress(event.key)) {
176 this.setState({ showShortcutIndex }); 176 this.setState({ showShortcutIndex });
177 } 177 }
178 }; 178 };