Moves message details into React pane land
This commit is contained in:
parent
3def746014
commit
a80c6d89a8
20 changed files with 501 additions and 558 deletions
|
@ -3,8 +3,8 @@
|
|||
|
||||
import React from 'react';
|
||||
import { useSelector } from 'react-redux';
|
||||
import type { PanelRenderType } from '../../types/Panels';
|
||||
import type { StateType } from '../reducer';
|
||||
import type { ReactPanelRenderType } from '../../types/Panels';
|
||||
import * as log from '../../logging/log';
|
||||
import { ContactDetail } from '../../components/conversation/ContactDetail';
|
||||
import { ConversationView } from '../../components/conversation/ConversationView';
|
||||
|
@ -18,11 +18,12 @@ import { SmartConversationNotificationsSettings } from './ConversationNotificati
|
|||
import { SmartGV1Members } from './GV1Members';
|
||||
import { SmartGroupLinkManagement } from './GroupLinkManagement';
|
||||
import { SmartGroupV2Permissions } from './GroupV2Permissions';
|
||||
import { SmartMessageDetail } from './MessageDetail';
|
||||
import { SmartPendingInvites } from './PendingInvites';
|
||||
import { SmartStickerManager } from './StickerManager';
|
||||
import { SmartTimeline } from './Timeline';
|
||||
import { getIntl } from '../selectors/user';
|
||||
import { getTopPanelRenderableByReact } from '../selectors/conversations';
|
||||
import { getTopPanel } from '../selectors/conversations';
|
||||
import { useComposerActions } from '../ducks/composer';
|
||||
import { useConversationsActions } from '../ducks/conversations';
|
||||
|
||||
|
@ -33,10 +34,10 @@ export type PropsType = {
|
|||
export function SmartConversationView({
|
||||
conversationId,
|
||||
}: PropsType): JSX.Element {
|
||||
const { startConversation } = useConversationsActions();
|
||||
const topPanel = useSelector<StateType, ReactPanelRenderType | undefined>(
|
||||
getTopPanelRenderableByReact
|
||||
const topPanel = useSelector<StateType, PanelRenderType | undefined>(
|
||||
getTopPanel
|
||||
);
|
||||
const { startConversation } = useConversationsActions();
|
||||
|
||||
const { processAttachments } = useComposerActions();
|
||||
const i18n = useSelector(getIntl);
|
||||
|
@ -136,6 +137,14 @@ export function SmartConversationView({
|
|||
);
|
||||
}
|
||||
|
||||
if (topPanel.type === PanelType.MessageDetails) {
|
||||
return (
|
||||
<div className="panel message-detail-wrapper">
|
||||
<SmartMessageDetail />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (topPanel.type === PanelType.NotificationSettings) {
|
||||
return (
|
||||
<div className="panel">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue