diff options
| author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-29 10:46:34 +0900 | 
|---|---|---|
| committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-31 19:34:32 +0900 | 
| commit | 2c600786c8ecfd73db91204e6fd816d54c077d77 (patch) | |
| tree | 8615ebf4389121f221c7e69c684c0d2ebabc74d6 /src/content/components | |
| parent | 24c736945126625c6e099d6062bcd51a0c967e68 (diff) | |
rename to follow-controller
Diffstat (limited to 'src/content/components')
| -rw-r--r-- | src/content/components/top-content/follow-controller.js | 17 | 
1 files changed, 9 insertions, 8 deletions
| diff --git a/src/content/components/top-content/follow-controller.js b/src/content/components/top-content/follow-controller.js index a87ecc7..38869e6 100644 --- a/src/content/components/top-content/follow-controller.js +++ b/src/content/components/top-content/follow-controller.js @@ -1,4 +1,4 @@ -import * as followActions from 'content/actions/follow'; +import * as followControllerActions from 'content/actions/follow-controller';  import messages from 'shared/messages';  import HintKeyProducer from 'content/hint-key-producer'; @@ -28,7 +28,8 @@ export default class FollowController {    onMessage(message, sender) {      switch (message.type) {      case messages.FOLLOW_START: -      return this.store.dispatch(followActions.enable(message.newTab)); +      return this.store.dispatch( +        followControllerActions.enable(message.newTab));      case messages.FOLLOW_RESPONSE_COUNT_TARGETS:        return this.create(message.count, sender);      case messages.FOLLOW_KEY_PRESS: @@ -38,7 +39,7 @@ export default class FollowController {    update() {      let prevState = this.state; -    this.state = this.store.getState().follow; +    this.state = this.store.getState().followController;      if (!prevState.enabled && this.state.enabled) {        this.count(); @@ -53,7 +54,7 @@ export default class FollowController {      let shown = this.keys.filter(key => key.startsWith(this.state.keys));      if (shown.length === 1) {        this.activate(); -      this.store.dispatch(followActions.disable()); +      this.store.dispatch(followControllerActions.disable());      }      broadcastMessage(this.win, { @@ -73,18 +74,18 @@ export default class FollowController {      switch (key) {      case 'Enter':        this.activate(); -      this.store.dispatch(followActions.disable()); +      this.store.dispatch(followControllerActions.disable());        break;      case 'Escape': -      this.store.dispatch(followActions.disable()); +      this.store.dispatch(followControllerActions.disable());        break;      case 'Backspace':      case 'Delete': -      this.store.dispatch(followActions.backspace()); +      this.store.dispatch(followControllerActions.backspace());        break;      default:        if (DEFAULT_HINT_CHARSET.includes(key)) { -        this.store.dispatch(followActions.keyPress(key)); +        this.store.dispatch(followControllerActions.keyPress(key));        }        break;      } | 
