mirror of
https://github.com/danog/telegram-tt.git
synced 2024-12-03 18:17:59 +01:00
Sticker Modal: Support interactive author username (#1298)
This commit is contained in:
parent
ad647b50a0
commit
e032a8ff63
@ -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 ? (
|
||||
<>
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user