fix #310: useless comment remains uncollapsed

This commit is contained in:
Vyrtsev Mikhail
2019-04-20 20:58:58 +03:00
parent 7e84b356a2
commit 38f9fd855c
@@ -22,6 +22,7 @@ import { blockUser, unblockUser, setVirifiedStatus } from '@app/store/user/actio
import { Comment, Props } from './comment';
import { getCommentMode } from '@app/store/comments/getters';
import { uploadImage } from '@app/common/api';
import { getThreadIsCollapsed } from '@app/store/thread/getters';
const mapProps = (state: StoreState, cprops: { data: CommentType }) => {
const props: Pick<
@@ -34,7 +35,7 @@ const mapProps = (state: StoreState, cprops: { data: CommentType }) => {
post_info: state.info,
isCommentsDisabled: state.info.read_only || false,
theme: state.theme,
collapsed: state.collapsedThreads[cprops.data.id] === true,
collapsed: getThreadIsCollapsed(state, cprops.data),
};
return props;
};