PLT-3203 Commenting on the RHS while in permalink view makes the message not show up in the RHS (#3282)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
bde4326458
Коммит
3a6694cc6b
@@ -138,8 +138,8 @@ export function doFocusPost(channelId, postId, data) {
|
|||||||
});
|
});
|
||||||
AsyncClient.getChannels(true);
|
AsyncClient.getChannels(true);
|
||||||
AsyncClient.getChannelExtraInfo(channelId);
|
AsyncClient.getChannelExtraInfo(channelId);
|
||||||
AsyncClient.getPostsBefore(postId, 0, Constants.POST_FOCUS_CONTEXT_RADIUS);
|
AsyncClient.getPostsBefore(postId, 0, Constants.POST_FOCUS_CONTEXT_RADIUS, true);
|
||||||
AsyncClient.getPostsAfter(postId, 0, Constants.POST_FOCUS_CONTEXT_RADIUS);
|
AsyncClient.getPostsAfter(postId, 0, Constants.POST_FOCUS_CONTEXT_RADIUS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function emitPostFocusEvent(postId) {
|
export function emitPostFocusEvent(postId) {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import $ from 'jquery';
|
|||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
import AppDispatcher from '../dispatcher/app_dispatcher.jsx';
|
import AppDispatcher from '../dispatcher/app_dispatcher.jsx';
|
||||||
import Client from 'utils/web_client.jsx';
|
import Client from 'utils/web_client.jsx';
|
||||||
|
import * as AsyncClient from 'utils/async_client.jsx';
|
||||||
import ChannelStore from 'stores/channel_store.jsx';
|
import ChannelStore from 'stores/channel_store.jsx';
|
||||||
import UserStore from 'stores/user_store.jsx';
|
import UserStore from 'stores/user_store.jsx';
|
||||||
import PostDeletedModal from './post_deleted_modal.jsx';
|
import PostDeletedModal from './post_deleted_modal.jsx';
|
||||||
@@ -150,6 +151,8 @@ class CreateComment extends React.Component {
|
|||||||
Client.createPost(
|
Client.createPost(
|
||||||
post,
|
post,
|
||||||
(data) => {
|
(data) => {
|
||||||
|
AsyncClient.getPosts(this.props.channelId);
|
||||||
|
|
||||||
const channel = ChannelStore.get(this.props.channelId);
|
const channel = ChannelStore.get(this.props.channelId);
|
||||||
const member = ChannelStore.getMember(this.props.channelId);
|
const member = ChannelStore.getMember(this.props.channelId);
|
||||||
member.msg_count = channel.total_msg_count;
|
member.msg_count = channel.total_msg_count;
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ class EditPostModal extends React.Component {
|
|||||||
Client.updatePost(
|
Client.updatePost(
|
||||||
updatedPost,
|
updatedPost,
|
||||||
() => {
|
() => {
|
||||||
|
AsyncClient.getPosts(updatedPost.channel_id);
|
||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
},
|
},
|
||||||
(err) => {
|
(err) => {
|
||||||
|
|||||||
@@ -551,7 +551,7 @@ PostStore.dispatchToken = AppDispatcher.register((payload) => {
|
|||||||
|
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
case ActionTypes.RECEIVED_POSTS: {
|
case ActionTypes.RECEIVED_POSTS: {
|
||||||
const id = PostStore.currentFocusedPostId == null ? action.id : PostStore.currentFocusedPostId;
|
const id = PostStore.currentFocusedPostId !== null && action.isPost ? PostStore.currentFocusedPostId : action.id;
|
||||||
PostStore.storePosts(id, makePostListNonNull(action.post_list));
|
PostStore.storePosts(id, makePostListNonNull(action.post_list));
|
||||||
PostStore.checkBounds(id, action.numRequested, makePostListNonNull(action.post_list), action.before);
|
PostStore.checkBounds(id, action.numRequested, makePostListNonNull(action.post_list), action.before);
|
||||||
PostStore.emitChange();
|
PostStore.emitChange();
|
||||||
|
|||||||
@@ -603,7 +603,7 @@ export function getPosts(id) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getPostsBefore(postId, offset, numPost) {
|
export function getPostsBefore(postId, offset, numPost, isPost) {
|
||||||
const channelId = ChannelStore.getCurrentId();
|
const channelId = ChannelStore.getCurrentId();
|
||||||
if (channelId == null) {
|
if (channelId == null) {
|
||||||
return;
|
return;
|
||||||
@@ -624,7 +624,8 @@ export function getPostsBefore(postId, offset, numPost) {
|
|||||||
id: channelId,
|
id: channelId,
|
||||||
before: true,
|
before: true,
|
||||||
numRequested: numPost,
|
numRequested: numPost,
|
||||||
post_list: data
|
post_list: data,
|
||||||
|
isPost
|
||||||
});
|
});
|
||||||
|
|
||||||
getProfiles();
|
getProfiles();
|
||||||
@@ -638,7 +639,7 @@ export function getPostsBefore(postId, offset, numPost) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getPostsAfter(postId, offset, numPost) {
|
export function getPostsAfter(postId, offset, numPost, isPost) {
|
||||||
const channelId = ChannelStore.getCurrentId();
|
const channelId = ChannelStore.getCurrentId();
|
||||||
if (channelId == null) {
|
if (channelId == null) {
|
||||||
return;
|
return;
|
||||||
@@ -659,7 +660,8 @@ export function getPostsAfter(postId, offset, numPost) {
|
|||||||
id: channelId,
|
id: channelId,
|
||||||
before: false,
|
before: false,
|
||||||
numRequested: numPost,
|
numRequested: numPost,
|
||||||
post_list: data
|
post_list: data,
|
||||||
|
isPost
|
||||||
});
|
});
|
||||||
|
|
||||||
getProfiles();
|
getProfiles();
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user