|
|
|
@ -54,6 +54,8 @@ import { ConversationMessageRequestButtons } from './ConversationRequestButtons'
|
|
|
|
|
import { ConversationRequestinfo } from './ConversationRequestInfo';
|
|
|
|
|
import { getCurrentRecoveryPhrase } from '../../util/storage';
|
|
|
|
|
import loadImage from 'blueimp-load-image';
|
|
|
|
|
import { SessionSpinner } from '../basic/SessionSpinner';
|
|
|
|
|
import styled from 'styled-components';
|
|
|
|
|
// tslint:disable: jsx-curly-spacing
|
|
|
|
|
|
|
|
|
|
interface State {
|
|
|
|
@ -78,8 +80,25 @@ interface Props {
|
|
|
|
|
lightBoxOptions?: LightBoxOptions;
|
|
|
|
|
|
|
|
|
|
stagedAttachments: Array<StagedAttachmentType>;
|
|
|
|
|
isSelectedConvoInitialLoadingInProgress: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const StyledSpinnerContainer = styled.div`
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
align-items: center;
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
const ConvoLoadingSpinner = () => {
|
|
|
|
|
return (
|
|
|
|
|
<StyledSpinnerContainer>
|
|
|
|
|
<SessionSpinner loading={true} />
|
|
|
|
|
</StyledSpinnerContainer>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export class SessionConversation extends React.Component<Props, State> {
|
|
|
|
|
private readonly messageContainerRef: React.RefObject<HTMLDivElement>;
|
|
|
|
|
private dragCounter: number;
|
|
|
|
@ -219,6 +238,7 @@ export class SessionConversation extends React.Component<Props, State> {
|
|
|
|
|
selectedMessages,
|
|
|
|
|
isRightPanelShowing,
|
|
|
|
|
lightBoxOptions,
|
|
|
|
|
isSelectedConvoInitialLoadingInProgress,
|
|
|
|
|
} = this.props;
|
|
|
|
|
|
|
|
|
|
if (!selectedConversation || !messagesProps) {
|
|
|
|
@ -233,6 +253,10 @@ export class SessionConversation extends React.Component<Props, State> {
|
|
|
|
|
<div className="conversation-header">
|
|
|
|
|
<ConversationHeaderWithDetails />
|
|
|
|
|
</div>
|
|
|
|
|
{isSelectedConvoInitialLoadingInProgress ? (
|
|
|
|
|
<ConvoLoadingSpinner />
|
|
|
|
|
) : (
|
|
|
|
|
<>
|
|
|
|
|
<div
|
|
|
|
|
// if you change the classname, also update it on onKeyDown
|
|
|
|
|
className={classNames('conversation-content', selectionMode && 'selection-mode')}
|
|
|
|
@ -269,10 +293,15 @@ export class SessionConversation extends React.Component<Props, State> {
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
className={classNames('conversation-item__options-pane', isRightPanelShowing && 'show')}
|
|
|
|
|
className={classNames(
|
|
|
|
|
'conversation-item__options-pane',
|
|
|
|
|
isRightPanelShowing && 'show'
|
|
|
|
|
)}
|
|
|
|
|
>
|
|
|
|
|
<SessionRightPanelWithDetails />
|
|
|
|
|
</div>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
</SessionTheme>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|