move background actions to operations
This commit is contained in:
parent
0ae39f1b67
commit
b6e5153c1f
6 changed files with 56 additions and 33 deletions
|
@ -31,22 +31,6 @@ export default function reducer(state, action = {}, sender) {
|
|||
switch (action.type) {
|
||||
case actions.BACKGROUND_REQUEST_COMPLETIONS:
|
||||
return doCompletion(action.command, action.keywords, sender.tab.id);
|
||||
case actions.TABS_CLOSE:
|
||||
return tabs.closeTab(sender.tab.id);
|
||||
case actions.TABS_REOPEN:
|
||||
return tabs.reopenTab();
|
||||
case actions.TABS_PREV:
|
||||
return tabs.selectPrevTab(sender.tab.index, action.count);
|
||||
case actions.TABS_NEXT:
|
||||
return tabs.selectNextTab(sender.tab.index, action.count);
|
||||
case actions.TABS_RELOAD:
|
||||
return tabs.reload(sender.tab, action.cache);
|
||||
case actions.ZOOM_IN:
|
||||
return zooms.zoomIn();
|
||||
case actions.ZOOM_OUT:
|
||||
return zooms.zoomOut();
|
||||
case actions.ZOOM_NEUTRAL:
|
||||
return zooms.neutral();
|
||||
default:
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
|
Reference in a new issue