Fixing jumping back to original message when recieving message in permalink view (#2751)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
4ab73d30b7
Коммит
64b8ed5e25
@@ -27,6 +27,7 @@ export default class PostFocusView extends React.Component {
|
|||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
scrollType: PostsView.SCROLL_TYPE_POST,
|
scrollType: PostsView.SCROLL_TYPE_POST,
|
||||||
|
currentChannel: ChannelStore.getCurrentId().slice(),
|
||||||
scrollPostId: focusedPostId,
|
scrollPostId: focusedPostId,
|
||||||
postList: PostStore.getVisiblePosts(focusedPostId),
|
postList: PostStore.getVisiblePosts(focusedPostId),
|
||||||
atTop: PostStore.getVisibilityAtTop(focusedPostId),
|
atTop: PostStore.getVisibilityAtTop(focusedPostId),
|
||||||
@@ -48,9 +49,13 @@ export default class PostFocusView extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onChannelChange() {
|
onChannelChange() {
|
||||||
this.setState({
|
const currentChannel = ChannelStore.getCurrentId();
|
||||||
scrollType: PostsView.SCROLL_TYPE_POST
|
if (this.state.currentChannel !== currentChannel) {
|
||||||
});
|
this.setState({
|
||||||
|
currentChannel: currentChannel.slice(),
|
||||||
|
scrollType: PostsView.SCROLL_TYPE_POST
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onUserChange() {
|
onUserChange() {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user