From bf555fae14db647d0f1711326126bf94194a0151 Mon Sep 17 00:00:00 2001
From: Christopher Speller <crspeller@gmail.com>
Date: Mon, 26 Oct 2015 15:16:14 -0400
Subject: Refactoring post_store into post_store and search_store

---
 web/react/components/sidebar_right.jsx | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

(limited to 'web/react/components/sidebar_right.jsx')

diff --git a/web/react/components/sidebar_right.jsx b/web/react/components/sidebar_right.jsx
index 4e6985a86..51225cbbe 100644
--- a/web/react/components/sidebar_right.jsx
+++ b/web/react/components/sidebar_right.jsx
@@ -3,11 +3,12 @@
 
 var SearchResults = require('./search_results.jsx');
 var RhsThread = require('./rhs_thread.jsx');
+var SearchStore = require('../stores/search_store.jsx');
 var PostStore = require('../stores/post_store.jsx');
 var Utils = require('../utils/utils.jsx');
 
 function getStateFromStores() {
-    return {search_visible: PostStore.getSearchResults() != null, post_right_visible: PostStore.getSelectedPost() != null, is_mention_search: PostStore.getIsMentionSearch()};
+    return {search_visible: SearchStore.getSearchResults() != null, post_right_visible: PostStore.getSelectedPost() != null, is_mention_search: SearchStore.getIsMentionSearch()};
 }
 
 export default class SidebarRight extends React.Component {
@@ -22,11 +23,11 @@ export default class SidebarRight extends React.Component {
         this.state = getStateFromStores();
     }
     componentDidMount() {
-        PostStore.addSearchChangeListener(this.onSearchChange);
+        SearchStore.addSearchChangeListener(this.onSearchChange);
         PostStore.addSelectedPostChangeListener(this.onSelectedChange);
     }
     componentWillUnmount() {
-        PostStore.removeSearchChangeListener(this.onSearchChange);
+        SearchStore.removeSearchChangeListener(this.onSearchChange);
         PostStore.removeSelectedPostChangeListener(this.onSelectedChange);
     }
     componentDidUpdate() {
-- 
cgit v1.2.3-1-g7c22

