feat: migrated lightbox to modal state

pull/3083/head
William Grant 10 months ago
parent bf218f0ec6
commit 009795eb3b

@ -34,7 +34,6 @@ import {
import { updateConfirmModal } from '../../state/ducks/modalDialog'; import { updateConfirmModal } from '../../state/ducks/modalDialog';
import { addStagedAttachmentsInConversation } from '../../state/ducks/stagedAttachments'; import { addStagedAttachmentsInConversation } from '../../state/ducks/stagedAttachments';
import { MIME } from '../../types'; import { MIME } from '../../types';
import { AttachmentTypeWithPath } from '../../types/Attachment';
import { import {
THUMBNAIL_CONTENT_TYPE, THUMBNAIL_CONTENT_TYPE,
getAudioDuration, getAudioDuration,
@ -48,7 +47,6 @@ import { EmptyMessageView } from '../EmptyMessageView';
import { SplitViewContainer } from '../SplitViewContainer'; import { SplitViewContainer } from '../SplitViewContainer';
import { SessionButtonColor } from '../basic/SessionButton'; import { SessionButtonColor } from '../basic/SessionButton';
import { InConversationCallContainer } from '../calling/InConversationCallContainer'; import { InConversationCallContainer } from '../calling/InConversationCallContainer';
import { LightboxGallery, MediaItemType } from '../lightbox/LightboxGallery';
import { NoMessageInConversation } from './SubtleNotification'; import { NoMessageInConversation } from './SubtleNotification';
import { ConversationHeaderWithDetails } from './header/ConversationHeader'; import { ConversationHeaderWithDetails } from './header/ConversationHeader';
@ -63,10 +61,6 @@ const DEFAULT_JPEG_QUALITY = 0.85;
interface State { interface State {
isDraggingFile: boolean; isDraggingFile: boolean;
} }
export interface LightBoxOptions {
media: Array<MediaItemType>;
attachment: AttachmentTypeWithPath;
}
interface Props { interface Props {
ourDisplayNameInProfile: string; ourDisplayNameInProfile: string;
@ -79,9 +73,6 @@ interface Props {
hasOngoingCallWithFocusedConvo: boolean; hasOngoingCallWithFocusedConvo: boolean;
htmlDirection: HTMLDirection; htmlDirection: HTMLDirection;
// lightbox options
lightBoxOptions?: LightBoxOptions;
stagedAttachments: Array<StagedAttachmentType>; stagedAttachments: Array<StagedAttachmentType>;
isSelectedConvoInitialLoadingInProgress: boolean; isSelectedConvoInitialLoadingInProgress: boolean;
} }
@ -238,7 +229,6 @@ export class SessionConversation extends Component<Props, State> {
messagesProps, messagesProps,
selectedMessages, selectedMessages,
isRightPanelShowing, isRightPanelShowing,
lightBoxOptions,
isSelectedConvoInitialLoadingInProgress, isSelectedConvoInitialLoadingInProgress,
} = this.props; } = this.props;
@ -280,8 +270,6 @@ export class SessionConversation extends Component<Props, State> {
onKeyDown={this.onKeyDown} onKeyDown={this.onKeyDown}
role="navigation" role="navigation"
> >
{lightBoxOptions?.media && this.renderLightBox(lightBoxOptions)}
<div className="conversation-messages"> <div className="conversation-messages">
<NoMessageInConversation /> <NoMessageInConversation />
@ -357,14 +345,6 @@ export class SessionConversation extends Component<Props, State> {
} }
} }
private renderLightBox({ media, attachment }: LightBoxOptions) {
const selectedIndex =
media.length > 1
? media.findIndex(mediaMessage => mediaMessage.attachment.path === attachment.path)
: 0;
return <LightboxGallery media={media} selectedIndex={selectedIndex} />;
}
private async onChoseAttachments(attachmentsFileList: Array<File>) { private async onChoseAttachments(attachmentsFileList: Array<File>) {
if (!attachmentsFileList || attachmentsFileList.length === 0) { if (!attachmentsFileList || attachmentsFileList.length === 0) {
return; return;

@ -3,10 +3,9 @@ import { useState } from 'react';
import { useDisableDrag } from '../../../hooks/useDisableDrag'; import { useDisableDrag } from '../../../hooks/useDisableDrag';
import { useEncryptedFileFetch } from '../../../hooks/useEncryptedFileFetch'; import { useEncryptedFileFetch } from '../../../hooks/useEncryptedFileFetch';
import { showLightBox } from '../../../state/ducks/conversations'; import { LightBoxOptions, updateLightBoxOptions } from '../../../state/ducks/modalDialog';
import { isImageTypeSupported, isVideoTypeSupported } from '../../../util/GoogleChrome'; import { isImageTypeSupported, isVideoTypeSupported } from '../../../util/GoogleChrome';
import { MediaItemType } from '../../lightbox/LightboxGallery'; import { MediaItemType } from '../../lightbox/LightboxGallery';
import { LightBoxOptions } from '../SessionConversation';
type Props = { type Props = {
mediaItem: MediaItemType; mediaItem: MediaItemType;
@ -104,7 +103,7 @@ export const MediaGridItem = (props: Props) => {
attachment: props.mediaItem.attachment, attachment: props.mediaItem.attachment,
}; };
window.inboxStore?.dispatch(showLightBox(lightBoxOptions)); window.inboxStore?.dispatch(updateLightBoxOptions(lightBoxOptions));
}} }}
> >
<MediaGridItemContent {...props} /> <MediaGridItemContent {...props} />

@ -5,11 +5,8 @@ import { useDispatch, useSelector } from 'react-redux';
import styled from 'styled-components'; import styled from 'styled-components';
import { Data } from '../../../../data/data'; import { Data } from '../../../../data/data';
import { MessageModelType, MessageRenderingProps } from '../../../../models/messageType'; import { MessageModelType, MessageRenderingProps } from '../../../../models/messageType';
import { import { PropsForAttachment, toggleSelectedMessageId } from '../../../../state/ducks/conversations';
PropsForAttachment, import { LightBoxOptions, updateLightBoxOptions } from '../../../../state/ducks/modalDialog';
showLightBox,
toggleSelectedMessageId,
} from '../../../../state/ducks/conversations';
import { StateType } from '../../../../state/reducer'; import { StateType } from '../../../../state/reducer';
import { useMessageSelected } from '../../../../state/selectors'; import { useMessageSelected } from '../../../../state/selectors';
import { import {
@ -28,10 +25,10 @@ import {
isVideo, isVideo,
} from '../../../../types/Attachment'; } from '../../../../types/Attachment';
import { saveAttachmentToDisk } from '../../../../util/attachmentsUtil'; import { saveAttachmentToDisk } from '../../../../util/attachmentsUtil';
import { MediaItemType } from '../../../lightbox/LightboxGallery';
import { Spinner } from '../../../loading'; import { Spinner } from '../../../loading';
import { AudioPlayerWithEncryptedFile } from '../../H5AudioPlayer'; import { AudioPlayerWithEncryptedFile } from '../../H5AudioPlayer';
import { ImageGrid } from '../../ImageGrid'; import { ImageGrid } from '../../ImageGrid';
import { LightBoxOptions } from '../../SessionConversation';
import { ClickToTrustSender } from './ClickToTrustSender'; import { ClickToTrustSender } from './ClickToTrustSender';
import { MessageHighlighter } from './MessageHighlighter'; import { MessageHighlighter } from './MessageHighlighter';
@ -244,7 +241,7 @@ export async function showLightboxFromAttachmentProps(
const media = (msgAttachments || []).map(attachmentForMedia => { const media = (msgAttachments || []).map(attachmentForMedia => {
index++; index++;
const messageTimestamp = const messageTimestamp =
found.get('timestamp') || found.get('serverTimestamp') || found.get('received_at'); found.get('timestamp') || found.get('serverTimestamp') || found.get('received_at') || -1;
return { return {
index: clone(index), index: clone(index),
@ -259,10 +256,10 @@ export async function showLightboxFromAttachmentProps(
if (attachmentIsAttachmentTypeWithPath(selected)) { if (attachmentIsAttachmentTypeWithPath(selected)) {
const lightBoxOptions: LightBoxOptions = { const lightBoxOptions: LightBoxOptions = {
media: media as any, media,
attachment: selected, attachment: selected,
}; };
window.inboxStore?.dispatch(showLightBox(lightBoxOptions)); window.inboxStore?.dispatch(updateLightBoxOptions(lightBoxOptions));
} else { } else {
window.log.warn('Attachment is not of the right type'); window.log.warn('Attachment is not of the right type');
} }
@ -281,10 +278,10 @@ const onClickAttachment = async (onClickProps: {
} }
const msgAttachments = found.getPropsForMessage().attachments; const msgAttachments = found.getPropsForMessage().attachments;
const media = (msgAttachments || []).map(attachmentForMedia => { const media: Array<MediaItemType> = (msgAttachments || []).map(attachmentForMedia => {
index++; index++;
const messageTimestamp = const messageTimestamp =
found.get('timestamp') || found.get('serverTimestamp') || found.get('received_at'); found.get('timestamp') || found.get('serverTimestamp') || found.get('received_at') || -1;
return { return {
index: clone(index), index: clone(index),
@ -299,10 +296,10 @@ const onClickAttachment = async (onClickProps: {
if (attachmentIsAttachmentTypeWithPath(onClickProps.attachment)) { if (attachmentIsAttachmentTypeWithPath(onClickProps.attachment)) {
const lightBoxOptions: LightBoxOptions = { const lightBoxOptions: LightBoxOptions = {
media: media as any, media,
attachment: onClickProps.attachment, attachment: onClickProps.attachment,
}; };
window.inboxStore?.dispatch(showLightBox(lightBoxOptions)); window.inboxStore?.dispatch(updateLightBoxOptions(lightBoxOptions));
} else { } else {
window.log.warn('Attachment is not of the right type'); window.log.warn('Attachment is not of the right type');
} }

@ -10,6 +10,7 @@ import {
getEnterPasswordModalState, getEnterPasswordModalState,
getHideRecoveryPasswordModalState, getHideRecoveryPasswordModalState,
getInviteContactModal, getInviteContactModal,
getLightBoxOptions,
getOnionPathDialog, getOnionPathDialog,
getReactClearAllDialog, getReactClearAllDialog,
getReactListDialog, getReactListDialog,
@ -19,6 +20,7 @@ import {
getUpdateGroupNameModal, getUpdateGroupNameModal,
getUserDetailsModal, getUserDetailsModal,
} from '../../state/selectors/modal'; } from '../../state/selectors/modal';
import { LightboxGallery } from '../lightbox/LightboxGallery';
import { BanOrUnBanUserDialog } from './BanOrUnbanUserDialog'; import { BanOrUnBanUserDialog } from './BanOrUnbanUserDialog';
import { DeleteAccountModal } from './DeleteAccountModal'; import { DeleteAccountModal } from './DeleteAccountModal';
import { EditProfilePictureModal } from './EditProfilePictureModal'; import { EditProfilePictureModal } from './EditProfilePictureModal';
@ -57,6 +59,7 @@ export const ModalContainer = () => {
const reactClearAllModalState = useSelector(getReactClearAllDialog); const reactClearAllModalState = useSelector(getReactClearAllDialog);
const editProfilePictureModalState = useSelector(getEditProfilePictureModalState); const editProfilePictureModalState = useSelector(getEditProfilePictureModalState);
const hideRecoveryPasswordModalState = useSelector(getHideRecoveryPasswordModalState); const hideRecoveryPasswordModalState = useSelector(getHideRecoveryPasswordModalState);
const lightBoxOptions = useSelector(getLightBoxOptions);
return ( return (
<> <>
@ -84,6 +87,7 @@ export const ModalContainer = () => {
{hideRecoveryPasswordModalState && ( {hideRecoveryPasswordModalState && (
<HideRecoveryPasswordDialog {...hideRecoveryPasswordModalState} /> <HideRecoveryPasswordDialog {...hideRecoveryPasswordModalState} />
)} )}
{lightBoxOptions && <LightboxGallery {...lightBoxOptions} />}
</> </>
); );
}; };

@ -6,7 +6,7 @@ import useUnmount from 'react-use/lib/useUnmount';
import styled from 'styled-components'; import styled from 'styled-components';
import { useDisableDrag } from '../../hooks/useDisableDrag'; import { useDisableDrag } from '../../hooks/useDisableDrag';
import { useEncryptedFileFetch } from '../../hooks/useEncryptedFileFetch'; import { useEncryptedFileFetch } from '../../hooks/useEncryptedFileFetch';
import { showLightBox } from '../../state/ducks/conversations'; import { updateLightBoxOptions } from '../../state/ducks/modalDialog';
import * as MIME from '../../types/MIME'; import * as MIME from '../../types/MIME';
import { assertUnreachable } from '../../types/sqlSharedTypes'; import { assertUnreachable } from '../../types/sqlSharedTypes';
import { GoogleChrome } from '../../util'; import { GoogleChrome } from '../../util';
@ -277,14 +277,14 @@ export const Lightbox = (props: Props) => {
const onObjectClick = (event: any) => { const onObjectClick = (event: any) => {
event.stopPropagation(); event.stopPropagation();
dispatch(showLightBox(undefined)); dispatch(updateLightBoxOptions(null));
}; };
const onContainerClick = (event: MouseEvent<HTMLDivElement>) => { const onContainerClick = (event: MouseEvent<HTMLDivElement>) => {
if (renderedRef && event.target === renderedRef.current) { if (renderedRef && event.target === renderedRef.current) {
return; return;
} }
dispatch(showLightBox(undefined)); dispatch(updateLightBoxOptions(null));
}; };
return ( return (
@ -309,7 +309,7 @@ export const Lightbox = (props: Props) => {
<IconButton <IconButton
type="close" type="close"
onClick={() => { onClick={() => {
dispatch(showLightBox(undefined)); dispatch(updateLightBoxOptions(null));
}} }}
/> />
</Flex> </Flex>

@ -4,7 +4,7 @@ import useKey from 'react-use/lib/useKey';
import { Lightbox } from './Lightbox'; import { Lightbox } from './Lightbox';
import { showLightBox } from '../../state/ducks/conversations'; import { updateLightBoxOptions } from '../../state/ducks/modalDialog';
import { useSelectedConversationKey } from '../../state/selectors/selectedConversation'; import { useSelectedConversationKey } from '../../state/selectors/selectedConversation';
import { MIME } from '../../types'; import { MIME } from '../../types';
import { AttachmentTypeWithPath } from '../../types/Attachment'; import { AttachmentTypeWithPath } from '../../types/Attachment';
@ -23,11 +23,11 @@ export interface MediaItemType {
type Props = { type Props = {
media: Array<MediaItemType>; media: Array<MediaItemType>;
selectedIndex: number; selectedIndex?: number;
}; };
export const LightboxGallery = (props: Props) => { export const LightboxGallery = (props: Props) => {
const { media } = props; const { media, selectedIndex = -1 } = props;
const [currentIndex, setCurrentIndex] = useState(-1); const [currentIndex, setCurrentIndex] = useState(-1);
const selectedConversation = useSelectedConversationKey(); const selectedConversation = useSelectedConversationKey();
@ -35,7 +35,7 @@ export const LightboxGallery = (props: Props) => {
// just run once, when the component is mounted. It's to show the lightbox on the specified index at start. // just run once, when the component is mounted. It's to show the lightbox on the specified index at start.
useEffect(() => { useEffect(() => {
setCurrentIndex(props.selectedIndex); setCurrentIndex(selectedIndex);
// eslint-disable-next-line react-hooks/exhaustive-deps // eslint-disable-next-line react-hooks/exhaustive-deps
}, []); }, []);
@ -82,7 +82,7 @@ export const LightboxGallery = (props: Props) => {
useKey( useKey(
'Escape', 'Escape',
() => { () => {
dispatch(showLightBox(undefined)); dispatch(updateLightBoxOptions(null));
}, },
undefined, undefined,
[currentIndex] [currentIndex]

@ -3,7 +3,6 @@ import { createAsyncThunk, createSlice, PayloadAction } from '@reduxjs/toolkit';
import { omit, toNumber } from 'lodash'; import { omit, toNumber } from 'lodash';
import { ReplyingToMessageProps } from '../../components/conversation/composition/CompositionBox'; import { ReplyingToMessageProps } from '../../components/conversation/composition/CompositionBox';
import { QuotedAttachmentType } from '../../components/conversation/message/message-content/quote/Quote'; import { QuotedAttachmentType } from '../../components/conversation/message/message-content/quote/Quote';
import { LightBoxOptions } from '../../components/conversation/SessionConversation';
import { Data } from '../../data/data'; import { Data } from '../../data/data';
import { import {
ConversationInteractionStatus, ConversationInteractionStatus,
@ -313,7 +312,6 @@ export type ConversationsStateType = {
messageInfoId: string | undefined; messageInfoId: string | undefined;
showRightPanel: boolean; showRightPanel: boolean;
selectedMessageIds: Array<string>; selectedMessageIds: Array<string>;
lightBox?: LightBoxOptions;
quotedMessage?: ReplyingToMessageProps; quotedMessage?: ReplyingToMessageProps;
areMoreMessagesBeingFetched: boolean; areMoreMessagesBeingFetched: boolean;
@ -869,7 +867,6 @@ const conversationsSlice = createSlice({
showRightPanel: false, showRightPanel: false,
selectedMessageIds: [], selectedMessageIds: [],
lightBox: undefined,
messageInfoId: undefined, messageInfoId: undefined,
quotedMessage: undefined, quotedMessage: undefined,
@ -935,13 +932,6 @@ const conversationsSlice = createSlice({
state.oldBottomMessageId = null; state.oldBottomMessageId = null;
return state; return state;
}, },
showLightBox(
state: ConversationsStateType,
action: PayloadAction<LightBoxOptions | undefined>
) {
state.lightBox = action.payload;
return state;
},
showScrollToBottomButton(state: ConversationsStateType, action: PayloadAction<boolean>) { showScrollToBottomButton(state: ConversationsStateType, action: PayloadAction<boolean>) {
state.showScrollButton = action.payload; state.showScrollButton = action.payload;
return state; return state;
@ -1141,7 +1131,6 @@ export const {
addMessageIdToSelection, addMessageIdToSelection,
resetSelectedMessageIds, resetSelectedMessageIds,
toggleSelectedMessageId, toggleSelectedMessageId,
showLightBox,
quoteMessage, quoteMessage,
showScrollToBottomButton, showScrollToBottomButton,
quotedMessageToAnimate, quotedMessageToAnimate,

@ -2,6 +2,8 @@ import { createSlice, PayloadAction } from '@reduxjs/toolkit';
import { EnterPasswordModalProps } from '../../components/dialog/EnterPasswordModal'; import { EnterPasswordModalProps } from '../../components/dialog/EnterPasswordModal';
import { HideRecoveryPasswordDialogProps } from '../../components/dialog/HideRecoveryPasswordDialog'; import { HideRecoveryPasswordDialogProps } from '../../components/dialog/HideRecoveryPasswordDialog';
import { SessionConfirmDialogProps } from '../../components/dialog/SessionConfirm'; import { SessionConfirmDialogProps } from '../../components/dialog/SessionConfirm';
import { MediaItemType } from '../../components/lightbox/LightboxGallery';
import { AttachmentTypeWithPath } from '../../types/Attachment';
import type { EditProfilePictureModalProps, PasswordAction } from '../../types/ReduxTypes'; import type { EditProfilePictureModalProps, PasswordAction } from '../../types/ReduxTypes';
export type BanType = 'ban' | 'unban'; export type BanType = 'ban' | 'unban';
@ -40,6 +42,12 @@ export type EditProfilePictureModalState = EditProfilePictureModalProps | null;
export type HideRecoveryPasswordModalState = HideRecoveryPasswordDialogProps | null; export type HideRecoveryPasswordModalState = HideRecoveryPasswordDialogProps | null;
export type LightBoxOptions = {
media: Array<MediaItemType>;
attachment: AttachmentTypeWithPath;
selectedIndex?: number;
} | null;
export type ModalState = { export type ModalState = {
confirmModal: ConfirmModalState; confirmModal: ConfirmModalState;
inviteContactModal: InviteContactModalState; inviteContactModal: InviteContactModalState;
@ -59,6 +67,7 @@ export type ModalState = {
reactClearAllModalState: ReactModalsState; reactClearAllModalState: ReactModalsState;
editProfilePictureModalState: EditProfilePictureModalState; editProfilePictureModalState: EditProfilePictureModalState;
hideRecoveryPasswordModalState: HideRecoveryPasswordModalState; hideRecoveryPasswordModalState: HideRecoveryPasswordModalState;
lightBoxOptions: LightBoxOptions;
}; };
export const initialModalState: ModalState = { export const initialModalState: ModalState = {
@ -80,6 +89,7 @@ export const initialModalState: ModalState = {
reactClearAllModalState: null, reactClearAllModalState: null,
editProfilePictureModalState: null, editProfilePictureModalState: null,
hideRecoveryPasswordModalState: null, hideRecoveryPasswordModalState: null,
lightBoxOptions: null,
}; };
const ModalSlice = createSlice({ const ModalSlice = createSlice({
@ -140,6 +150,23 @@ const ModalSlice = createSlice({
updateHideRecoveryPasswordModel(state, action: PayloadAction<HideRecoveryPasswordModalState>) { updateHideRecoveryPasswordModel(state, action: PayloadAction<HideRecoveryPasswordModalState>) {
return { ...state, hideRecoveryPasswordModalState: action.payload }; return { ...state, hideRecoveryPasswordModalState: action.payload };
}, },
updateLightBoxOptions(state, action: PayloadAction<LightBoxOptions>) {
const lightBoxOptions = action.payload;
if (lightBoxOptions) {
const { media, attachment } = lightBoxOptions;
if (attachment && media) {
const selectedIndex =
media.length > 1
? media.findIndex(mediaMessage => mediaMessage.attachment.path === attachment.path)
: 0;
lightBoxOptions.selectedIndex = selectedIndex;
}
}
return { ...state, lightBoxOptions };
},
}, },
}); });
@ -163,5 +190,6 @@ export const {
updateReactClearAllModal, updateReactClearAllModal,
updateEditProfilePictureModel, updateEditProfilePictureModel,
updateHideRecoveryPasswordModel, updateHideRecoveryPasswordModel,
updateLightBoxOptions,
} = actions; } = actions;
export const modalReducer = reducer; export const modalReducer = reducer;

@ -22,7 +22,6 @@ import { MessageContentSelectorProps } from '../../components/conversation/messa
import { MessageContentWithStatusSelectorProps } from '../../components/conversation/message/message-content/MessageContentWithStatus'; import { MessageContentWithStatusSelectorProps } from '../../components/conversation/message/message-content/MessageContentWithStatus';
import { MessageTextSelectorProps } from '../../components/conversation/message/message-content/MessageText'; import { MessageTextSelectorProps } from '../../components/conversation/message/message-content/MessageText';
import { GenericReadableMessageSelectorProps } from '../../components/conversation/message/message-item/GenericReadableMessage'; import { GenericReadableMessageSelectorProps } from '../../components/conversation/message/message-item/GenericReadableMessage';
import { LightBoxOptions } from '../../components/conversation/SessionConversation';
import { hasValidIncomingRequestValues } from '../../models/conversation'; import { hasValidIncomingRequestValues } from '../../models/conversation';
import { CONVERSATION_PRIORITIES, isOpenOrClosedGroup } from '../../models/conversationAttributes'; import { CONVERSATION_PRIORITIES, isOpenOrClosedGroup } from '../../models/conversationAttributes';
import { getConversationController } from '../../session/conversations'; import { getConversationController } from '../../session/conversations';
@ -511,9 +510,6 @@ export const getSelectedMessageIds = (state: StateType): Array<string> =>
export const getIsMessageSelectionMode = (state: StateType): boolean => export const getIsMessageSelectionMode = (state: StateType): boolean =>
Boolean(getSelectedMessageIds(state).length); Boolean(getSelectedMessageIds(state).length);
export const getLightBoxOptions = (state: StateType): LightBoxOptions | undefined =>
state.conversations.lightBox;
export const getQuotedMessage = (state: StateType): ReplyingToMessageProps | undefined => export const getQuotedMessage = (state: StateType): ReplyingToMessageProps | undefined =>
state.conversations.quotedMessage; state.conversations.quotedMessage;

@ -11,6 +11,7 @@ import {
EnterPasswordModalState, EnterPasswordModalState,
HideRecoveryPasswordModalState, HideRecoveryPasswordModalState,
InviteContactModalState, InviteContactModalState,
LightBoxOptions,
ModalState, ModalState,
OnionPathModalState, OnionPathModalState,
ReactModalsState, ReactModalsState,
@ -115,3 +116,8 @@ export const getHideRecoveryPasswordModalState = createSelector(
getModal, getModal,
(state: ModalState): HideRecoveryPasswordModalState => state.hideRecoveryPasswordModalState (state: ModalState): HideRecoveryPasswordModalState => state.hideRecoveryPasswordModalState
); );
export const getLightBoxOptions = createSelector(
getModal,
(state: ModalState): LightBoxOptions => state.lightBoxOptions
);

@ -6,7 +6,6 @@ import { StateType } from '../reducer';
import { getHasOngoingCallWithFocusedConvo } from '../selectors/call'; import { getHasOngoingCallWithFocusedConvo } from '../selectors/call';
import { import {
getIsSelectedConvoInitialLoadingInProgress, getIsSelectedConvoInitialLoadingInProgress,
getLightBoxOptions,
getSelectedConversation, getSelectedConversation,
getSelectedMessageIds, getSelectedMessageIds,
getSortedMessagesOfSelectedConversation, getSortedMessagesOfSelectedConversation,
@ -31,7 +30,6 @@ const mapStateToProps = (state: StateType, ownProps: SmartSessionConversationOwn
ourNumber: getOurNumber(state), ourNumber: getOurNumber(state),
isRightPanelShowing: isRightPanelShowing(state), isRightPanelShowing: isRightPanelShowing(state),
selectedMessages: getSelectedMessageIds(state), selectedMessages: getSelectedMessageIds(state),
lightBoxOptions: getLightBoxOptions(state),
stagedAttachments: getStagedAttachmentsForCurrentConversation(state), stagedAttachments: getStagedAttachmentsForCurrentConversation(state),
hasOngoingCallWithFocusedConvo: getHasOngoingCallWithFocusedConvo(state), hasOngoingCallWithFocusedConvo: getHasOngoingCallWithFocusedConvo(state),
isSelectedConvoInitialLoadingInProgress: getIsSelectedConvoInitialLoadingInProgress(state), isSelectedConvoInitialLoadingInProgress: getIsSelectedConvoInitialLoadingInProgress(state),

Loading…
Cancel
Save