From 041d89b85a22b0a498a4176d0d26fd5dc84c33f9 Mon Sep 17 00:00:00 2001
From: JoramWilander <jwawilander@gmail.com>
Date: Wed, 26 Aug 2015 12:09:01 -0400
Subject: Refactored post handling/updating on both the client and server.

---
 web/react/components/sidebar_right.jsx | 12 +++++-------
 1 file changed, 5 insertions(+), 7 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 8334b345b..df75e3adf 100644
--- a/web/react/components/sidebar_right.jsx
+++ b/web/react/components/sidebar_right.jsx
@@ -1,11 +1,9 @@
 // Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved.
 // See License.txt for license information.
 
-
-var SearchResults =require('./search_results.jsx');
-var PostRight =require('./post_right.jsx');
+var SearchResults = require('./search_results.jsx');
+var RhsThread = require('./rhs_thread.jsx');
 var PostStore = require('../stores/post_store.jsx');
-var Constants = require('../utils/constants.jsx');
 var utils = require('../utils/utils.jsx');
 
 function getStateFromStores(from_search) {
@@ -39,8 +37,8 @@ module.exports = React.createClass({
         }
     },
     resize: function() {
-        $(".post-list-holder-by-time").scrollTop(100000);
-        $(".post-list-holder-by-time").perfectScrollbar('update');
+        var postHolder = $('.post-list-holder-by-time');
+        postHolder[0].scrollTop = postHolder[0].scrollHeight - 224;
     },
     getInitialState: function() {
         return getStateFromStores();
@@ -72,7 +70,7 @@ module.exports = React.createClass({
             content = <SearchResults isMentionSearch={this.state.is_mention_search} />;
         }
         else if (this.state.post_right_visible) {
-            content = <PostRight fromSearch={this.state.from_search} isMentionSearch={this.state.is_mention_search} />;
+            content = <RhsThread fromSearch={this.state.from_search} isMentionSearch={this.state.is_mention_search} />;
         }
 
         return (
-- 
cgit v1.2.3-1-g7c22

