Merge branch 'master' into PLT-12

Этот коммит содержится в:
=Corey Hulen
2015-09-11 09:59:32 -07:00
родитель e5e88d1604 471e783996
Коммит 714f47e015
8 изменённых файлов: 35 добавлений и 33 удалений

Просмотреть файл

@@ -152,7 +152,7 @@ export default class Post extends React.Component {
return (
<div>
<div
id={post.id}
id={'post_' + post.id}
className={'post ' + sameUserClass + ' ' + rootUser + ' ' + postType + ' ' + currentUserCss}
>
{profilePic}

Просмотреть файл

@@ -189,9 +189,15 @@ export default class PostList extends React.Component {
this.scrollToBottom(true);
// the user clicked 'load more messages'
} else if (this.gotMorePosts) {
var lastPost = oldPosts[oldOrder[prevState.numToDisplay]];
$('#' + lastPost.id)[0].scrollIntoView();
} else if (this.gotMorePosts && oldOrder.length > 0) {
let index;
if (prevState.numToDisplay >= oldOrder.length) {
index = oldOrder.length - 1;
} else {
index = prevState.numToDisplay;
}
const lastPost = oldPosts[oldOrder[index]];
$('#post_' + lastPost.id)[0].scrollIntoView();
this.gotMorePosts = false;
} else {
this.scrollTo(this.prevScrollTop);