diff --git a/app/components/Search/search.jsx b/app/components/Search/search.jsx index d9a81107..bb631e23 100644 --- a/app/components/Search/search.jsx +++ b/app/components/Search/search.jsx @@ -7,7 +7,7 @@ import { openFile } from 'commands/commandBindings/file' import * as delegate from 'commons/Search/action' import icons from 'file-icons-js' import { Aa, Word, Reg } from './icons' -import * as api from 'backendAPI/searchAPI' +import api from 'backendAPI/' import config from 'config' const hoverColor = '#337ab7' @@ -74,6 +74,10 @@ export class SearchResultItem extends Component { @observer class SearchPanel extends Component { + componentWillMount() { + api.connectSearchWebsocketClient() + } + componentDidMount () { subscribeToSearch() } diff --git a/app/initialize/state.js b/app/initialize/state.js index 5272353c..2a548904 100644 --- a/app/initialize/state.js +++ b/app/initialize/state.js @@ -79,11 +79,6 @@ const stepCache = observable.map({ func: () => api.connectWebsocketClient() }, - connectSearchSocket: { - desc: 'Connect Search Websocket', - func: () => - api.connectSearchWebsocketClient() - }, preventAccidentalClose: { desc: 'Prevent accidental close', func: () => { diff --git a/app/workstation/state.js b/app/workstation/state.js index 4bc948fb..bd72d956 100644 --- a/app/workstation/state.js +++ b/app/workstation/state.js @@ -205,11 +205,6 @@ const stepCache = observable.map({ func: () => api.connectWebsocketClient() }, - connectSearchSocket: { - desc: 'Connect Search WebSocket', - func: () => - api.connectSearchWebsocketClient() - }, getProjectType: { desc: 'Estimate project type -- platform', enable: config.isPlatform,