Moves showStickerPackPreview to globalModals

This commit is contained in:
Josh Perez 2022-12-09 14:01:46 -05:00 committed by GitHub
parent c0ebafe2bc
commit 7c68f9ef1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 104 additions and 124 deletions

View file

@ -16,6 +16,7 @@ import { mapDispatchToProps } from '../actions';
import { getIntl, getTheme } from '../selectors/user';
import { SmartAddUserToAnotherGroupModal } from './AddUserToAnotherGroupModal';
import { SmartStickerPreviewModal } from './StickerPreviewModal';
function renderProfileEditor(): JSX.Element {
return <SmartProfileEditorModal />;
@ -40,6 +41,8 @@ function renderSendAnywayDialog(): JSX.Element {
const mapStateToProps = (state: StateType) => {
const i18n = getIntl(state);
const { stickerPackPreviewId } = state.globalModals;
return {
...state.globalModals,
hasSafetyNumberChangeModal: getConversationsStoppingSend(state).length > 0,
@ -49,6 +52,10 @@ const mapStateToProps = (state: StateType) => {
renderForwardMessageModal,
renderProfileEditor,
renderStoriesSettings,
renderStickerPreviewModal: () =>
stickerPackPreviewId ? (
<SmartStickerPreviewModal packId={stickerPackPreviewId} />
) : null,
renderSafetyNumber: () => (
<SmartSafetyNumberModal
contactID={String(state.globalModals.safetyNumberModalContactId)}