diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-11-11 18:45:10 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-11-11 18:51:32 +0900 |
commit | fe8a9283172e43e29480c4293c34565859c04c32 (patch) | |
tree | d9160c76f4c3435b0859669f1254b12eb92d183f /src | |
parent | e3409b3aaea81eca6e10df0b1880067ddf4df961 (diff) |
remove unused actions and fix test
Diffstat (limited to 'src')
-rw-r--r-- | src/content/actions/find.js | 10 | ||||
-rw-r--r-- | src/content/actions/index.js | 2 | ||||
-rw-r--r-- | src/content/reducers/find.js | 9 |
3 files changed, 1 insertions, 20 deletions
diff --git a/src/content/actions/find.js b/src/content/actions/find.js index ac1b842..80d6210 100644 --- a/src/content/actions/find.js +++ b/src/content/actions/find.js @@ -14,14 +14,6 @@ const postPatternNotFound = (pattern) => { 'Pattern not found: ' + pattern); }; -const show = () => { - return { type: actions.FIND_SHOW }; -}; - -const hide = () => { - return { type: actions.FIND_HIDE }; -}; - const find = (string, backwards) => { let caseSensitive = false; let wrapScan = true; @@ -60,4 +52,4 @@ const prev = (keyword, reset) => { return findNext(keyword, reset, true); }; -export { show, hide, next, prev }; +export { next, prev }; diff --git a/src/content/actions/index.js b/src/content/actions/index.js index a727e13..7e32e12 100644 --- a/src/content/actions/index.js +++ b/src/content/actions/index.js @@ -23,7 +23,5 @@ export default { FOLLOW_CONTROLLER_BACKSPACE: 'follow.controller.backspace', // Find - FIND_SHOW: 'find.show', - FIND_HIDE: 'find.hide', FIND_SET_KEYWORD: 'find.set.keyword', }; diff --git a/src/content/reducers/find.js b/src/content/reducers/find.js index f0bfbeb..eb43c37 100644 --- a/src/content/reducers/find.js +++ b/src/content/reducers/find.js @@ -1,21 +1,12 @@ import actions from 'content/actions'; const defaultState = { - enabled: false, keyword: '', found: false, }; export default function reducer(state = defaultState, action = {}) { switch (action.type) { - case actions.FIND_SHOW: - return Object.assign({}, state, { - enabled: true, - }); - case actions.FIND_HIDE: - return Object.assign({}, state, { - enabled: false, - }); case actions.FIND_SET_KEYWORD: return Object.assign({}, state, { keyword: action.keyword, |