Properly updated pinned/flagged posts on deletion (#6920)
Этот коммит содержится в:
коммит произвёл
Saturnino Abril
родитель
d3506c9d69
Коммит
8395981d2b
@@ -216,6 +216,12 @@ export function deletePost(channelId, post, success) {
|
||||
data: post
|
||||
});
|
||||
|
||||
// Needed for search store
|
||||
AppDispatcher.handleViewAction({
|
||||
type: Constants.ActionTypes.REMOVE_POST,
|
||||
post
|
||||
});
|
||||
|
||||
const {focusedPostId} = getState().views.channel;
|
||||
const channel = getState().entities.channels.channels[post.channel_id];
|
||||
if (post.id === focusedPostId && channel) {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// See License.txt for license information.
|
||||
|
||||
import $ from 'jquery';
|
||||
import AppDispatcher from 'dispatcher/app_dispatcher.jsx';
|
||||
|
||||
import UserStore from 'stores/user_store.jsx';
|
||||
import TeamStore from 'stores/team_store.jsx';
|
||||
@@ -265,6 +266,12 @@ function handlePostEditEvent(msg) {
|
||||
function handlePostDeleteEvent(msg) {
|
||||
const post = JSON.parse(msg.data.post);
|
||||
dispatch({type: PostTypes.POST_DELETED, data: post});
|
||||
|
||||
// Needed for search store
|
||||
AppDispatcher.handleViewAction({
|
||||
type: Constants.ActionTypes.POST_DELETED,
|
||||
post
|
||||
});
|
||||
}
|
||||
|
||||
async function handleTeamAddedEvent(msg) {
|
||||
|
||||
Ссылка в новой задаче
Block a user