Merge branch 'master' into PLT-12
Этот коммит содержится в:
@@ -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);
|
||||
|
||||
@@ -3,22 +3,22 @@
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"autolinker": "^0.18.1",
|
||||
"flux": "^2.1.1",
|
||||
"keymirror": "^0.1.1",
|
||||
"object-assign": "^3.0.0",
|
||||
"react": "^0.13.3",
|
||||
"react-zeroclipboard-mixin": "^0.1.0",
|
||||
"twemoji": "^1.4.1"
|
||||
"autolinker": "0.18.1",
|
||||
"flux": "2.1.1",
|
||||
"keymirror": "0.1.1",
|
||||
"object-assign": "3.0.0",
|
||||
"react": "0.13.3",
|
||||
"react-zeroclipboard-mixin": "0.1.0",
|
||||
"twemoji": "1.4.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"browserify": "^11.0.1",
|
||||
"envify": "^3.4.0",
|
||||
"babelify": "^6.1.3",
|
||||
"uglify-js": "^2.4.24",
|
||||
"watchify": "^3.3.1",
|
||||
"eslint": "^1.3.1",
|
||||
"eslint-plugin-react": "^3.3.1"
|
||||
"browserify": "11.0.1",
|
||||
"envify": "3.4.0",
|
||||
"babelify": "6.1.3",
|
||||
"uglify-js": "2.4.24",
|
||||
"watchify": "3.3.1",
|
||||
"eslint": "1.3.1",
|
||||
"eslint-plugin-react": "3.3.1"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "watchify --extension=jsx -o ../static/js/bundle.js -v -d ./**/*.jsx",
|
||||
|
||||
Ссылка в новой задаче
Block a user