mirror of
https://github.com/danog/telegram-tt.git
synced 2024-12-11 08:39: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 { selectStickerSet } from '../../modules/selectors';
|
||||||
import { useIntersectionObserver } from '../../hooks/useIntersectionObserver';
|
import { useIntersectionObserver } from '../../hooks/useIntersectionObserver';
|
||||||
import useLang from '../../hooks/useLang';
|
import useLang from '../../hooks/useLang';
|
||||||
|
import renderText from './helpers/renderText';
|
||||||
|
|
||||||
import Modal from '../ui/Modal';
|
import Modal from '../ui/Modal';
|
||||||
import Button from '../ui/Button';
|
import Button from '../ui/Button';
|
||||||
@ -78,7 +79,7 @@ const StickerSetModal: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
isOpen={isOpen}
|
isOpen={isOpen}
|
||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
hasCloseButton
|
hasCloseButton
|
||||||
title={stickerSet ? stickerSet.title : lang('AccDescrStickerSet')}
|
title={stickerSet ? renderText(stickerSet.title, ['emoji', 'links']) : lang('AccDescrStickerSet')}
|
||||||
>
|
>
|
||||||
{stickerSet && stickerSet.stickers ? (
|
{stickerSet && stickerSet.stickers ? (
|
||||||
<>
|
<>
|
||||||
|
@ -2,6 +2,8 @@ import React, {
|
|||||||
FC, useEffect, useRef,
|
FC, useEffect, useRef,
|
||||||
} from '../../lib/teact/teact';
|
} from '../../lib/teact/teact';
|
||||||
|
|
||||||
|
import { TextPart } from '../common/helpers/renderMessageText';
|
||||||
|
|
||||||
import captureKeyboardListeners from '../../util/captureKeyboardListeners';
|
import captureKeyboardListeners from '../../util/captureKeyboardListeners';
|
||||||
import trapFocus from '../../util/trapFocus';
|
import trapFocus from '../../util/trapFocus';
|
||||||
import buildClassName from '../../util/buildClassName';
|
import buildClassName from '../../util/buildClassName';
|
||||||
@ -19,10 +21,10 @@ import './Modal.scss';
|
|||||||
const ANIMATION_DURATION = 200;
|
const ANIMATION_DURATION = 200;
|
||||||
|
|
||||||
type OwnProps = {
|
type OwnProps = {
|
||||||
title?: string;
|
title?: string | TextPart[];
|
||||||
className?: string;
|
className?: string;
|
||||||
isOpen?: boolean;
|
isOpen?: boolean;
|
||||||
header?: FC;
|
header?: any;
|
||||||
hasCloseButton?: boolean;
|
hasCloseButton?: boolean;
|
||||||
noBackdrop?: boolean;
|
noBackdrop?: boolean;
|
||||||
children: any;
|
children: any;
|
||||||
|
Loading…
Reference in New Issue
Block a user