Forum Panel: Fix switching forums
This commit is contained in:
parent
cbf9845ab9
commit
ae2fc6bd69
@ -11,7 +11,7 @@ import {
|
|||||||
GENERAL_TOPIC_ID,
|
GENERAL_TOPIC_ID,
|
||||||
TOPICS_SLICE, TOPIC_HEIGHT_PX, TOPIC_LIST_SENSITIVE_AREA,
|
TOPICS_SLICE, TOPIC_HEIGHT_PX, TOPIC_LIST_SENSITIVE_AREA,
|
||||||
} from '../../../config';
|
} from '../../../config';
|
||||||
import { selectChat, selectCurrentMessageList } from '../../../global/selectors';
|
import { selectChat, selectCurrentMessageList, selectIsForumPanelOpen } from '../../../global/selectors';
|
||||||
import buildClassName from '../../../util/buildClassName';
|
import buildClassName from '../../../util/buildClassName';
|
||||||
import { getOrderedTopics } from '../../../global/helpers';
|
import { getOrderedTopics } from '../../../global/helpers';
|
||||||
import captureEscKeyListener from '../../../util/captureEscKeyListener';
|
import captureEscKeyListener from '../../../util/captureEscKeyListener';
|
||||||
@ -237,9 +237,9 @@ const ForumPanel: FC<OwnProps & StateProps> = ({
|
|||||||
|
|
||||||
export default memo(withGlobal<OwnProps>(
|
export default memo(withGlobal<OwnProps>(
|
||||||
(global, ownProps, detachWhenChanged): StateProps => {
|
(global, ownProps, detachWhenChanged): StateProps => {
|
||||||
const chatId = global.forumPanelChatId;
|
detachWhenChanged(selectIsForumPanelOpen(global));
|
||||||
detachWhenChanged(chatId);
|
|
||||||
|
|
||||||
|
const chatId = global.forumPanelChatId;
|
||||||
const chat = chatId ? selectChat(global, chatId) : undefined;
|
const chat = chatId ? selectChat(global, chatId) : undefined;
|
||||||
const {
|
const {
|
||||||
chatId: currentChatId,
|
chatId: currentChatId,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user