Skip to content

Commit 3559633

Browse files
authored
Merge pull request #1665 from session-foundation/feat/pro-renew-modals
feat: renew and expire states for pro cta modals
2 parents 3b80105 + d0c25b8 commit 3559633

File tree

10 files changed

+497
-188
lines changed

10 files changed

+497
-188
lines changed

ts/components/conversation/composition/CompositionBox.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ import { useShowBlockUnblock } from '../../menuAndSettingsHooks/useShowBlockUnbl
6161
import { showLocalizedPopupDialog } from '../../dialog/LocalizedPopupDialog';
6262
import { formatNumber } from '../../../util/i18n/formatting/generics';
6363
import { getFeatureFlag } from '../../../state/ducks/types/releasedFeaturesReduxTypes';
64-
import { SessionProInfoVariant, showSessionProInfoDialog } from '../../dialog/SessionProInfoModal';
64+
import { ProCTAVariant, showSessionProInfoDialog } from '../../dialog/SessionProInfoModal';
6565
import { tStripped } from '../../../localization/localeTools';
6666
import type { ProcessedLinkPreviewThumbnailType } from '../../../webworker/workers/node/image_processor/image_processor';
6767
import { selectWeAreProUser } from '../../../hooks/useParamSelector';
@@ -746,7 +746,7 @@ class CompositionBoxInner extends Component<Props, State> {
746746
const dispatch = window.inboxStore?.dispatch;
747747
if (dispatch) {
748748
if (isProAvailable && !hasPro) {
749-
showSessionProInfoDialog(SessionProInfoVariant.MESSAGE_CHARACTER_LIMIT, dispatch);
749+
showSessionProInfoDialog(ProCTAVariant.MESSAGE_CHARACTER_LIMIT, dispatch);
750750
} else {
751751
showLocalizedPopupDialog(
752752
{

ts/components/dialog/EditProfilePictureModal.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ import {
2626
} from '../SessionWrapperModal';
2727
import { useIsProAvailable } from '../../hooks/useIsProAvailable';
2828
import { SpacerLG, SpacerSM } from '../basic/Text';
29-
import {
30-
SessionProInfoVariant,
31-
useShowSessionProInfoDialogCbWithVariant,
32-
} from './SessionProInfoModal';
29+
import { ProCTAVariant, useShowSessionProInfoDialogCbWithVariant } from './SessionProInfoModal';
3330
import { AvatarSize } from '../avatar/Avatar';
3431
import { ProIconButton } from '../buttons/ProButton';
3532
import { useProBadgeOnClickCb } from '../menuAndSettingsHooks/useProBadgeOnClickCb';
@@ -202,7 +199,7 @@ export const EditProfilePictureModal = ({ conversationId }: EditProfilePictureMo
202199
* All of those are taken care of as part of the `isProUser` check in the conversation model
203200
*/
204201
if (isProAvailable && !userHasPro && isNewAvatarAnimated && !isCommunity) {
205-
handleShowProInfoModal(SessionProInfoVariant.PROFILE_PICTURE_ANIMATED);
202+
handleShowProInfoModal(ProCTAVariant.ANIMATED_DISPLAY_PICTURE);
206203
window.log.debug('Attempted to upload an animated profile picture without pro!');
207204
return;
208205
}

0 commit comments

Comments
 (0)