From 87b8280d4bdcaddeac1aff95d9354e1954b7c25a Mon Sep 17 00:00:00 2001 From: Jiabo Hou Date: Sun, 5 Nov 2017 17:59:46 -0500 Subject: code review * change default keybinding for pin/unpin tab from 'p' to 'zp' * use toggleTabPinned to toggle the tab pinned state, instead of updateTabPinned --- src/background/actions/operation.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/background/actions/operation.js') diff --git a/src/background/actions/operation.js b/src/background/actions/operation.js index c45eabd..d0caf80 100644 --- a/src/background/actions/operation.js +++ b/src/background/actions/operation.js @@ -10,6 +10,9 @@ const sendConsoleShowCommand = (tab, command) => { }); }; +// This switch statement is only gonna get longer as more +// features are added, so disable complexity check +/* eslint-disable complexity */ const exec = (operation, tab) => { switch (operation.type) { case operations.TAB_CLOSE: @@ -31,7 +34,7 @@ const exec = (operation, tab) => { case operations.TAB_UNPIN: return tabs.updateTabPinned(tab, false); case operations.TAB_TOGGLE_PINNED: - return tabs.updateTabPinned(tab); + return tabs.toggleTabPinned(tab); case operations.ZOOM_IN: return zooms.zoomIn(); case operations.ZOOM_OUT: @@ -64,5 +67,6 @@ const exec = (operation, tab) => { return Promise.resolve(); } }; +/* eslint-enable complexity */ export { exec }; -- cgit v1.2.3