Sticker Modal: Support interactive author username (#1298)

This commit is contained in:
Alexander Zinchuk 2021-07-20 15:47:52 +03:00
parent ad647b50a0
commit e032a8ff63
2 changed files with 6 additions and 3 deletions

View File

@ -11,6 +11,7 @@ import { pick } from '../../util/iteratees';
import { selectStickerSet } from '../../modules/selectors';
import { useIntersectionObserver } from '../../hooks/useIntersectionObserver';
import useLang from '../../hooks/useLang';
import renderText from './helpers/renderText';
import Modal from '../ui/Modal';
import Button from '../ui/Button';
@ -78,7 +79,7 @@ const StickerSetModal: FC<OwnProps & StateProps & DispatchProps> = ({
isOpen={isOpen}
onClose={onClose}
hasCloseButton
title={stickerSet ? stickerSet.title : lang('AccDescrStickerSet')}
title={stickerSet ? renderText(stickerSet.title, ['emoji', 'links']) : lang('AccDescrStickerSet')}
>
{stickerSet && stickerSet.stickers ? (
<>

View File

@ -2,6 +2,8 @@ import React, {
FC, useEffect, useRef,
} from '../../lib/teact/teact';
import { TextPart } from '../common/helpers/renderMessageText';
import captureKeyboardListeners from '../../util/captureKeyboardListeners';
import trapFocus from '../../util/trapFocus';
import buildClassName from '../../util/buildClassName';
@ -19,10 +21,10 @@ import './Modal.scss';
const ANIMATION_DURATION = 200;
type OwnProps = {
title?: string;
title?: string | TextPart[];
className?: string;
isOpen?: boolean;
header?: FC;
header?: any;
hasCloseButton?: boolean;
noBackdrop?: boolean;
children: any;