Message / Buttons: Do not show arrow for t.me links
This commit is contained in:
parent
f3e66ad75e
commit
92a17c6cf1
@ -2,6 +2,8 @@ import React, { FC } from '../../../lib/teact/teact';
|
|||||||
|
|
||||||
import { ApiKeyboardButton, ApiMessage } from '../../../api/types';
|
import { ApiKeyboardButton, ApiMessage } from '../../../api/types';
|
||||||
|
|
||||||
|
import { RE_TME_LINK } from '../../../config';
|
||||||
|
|
||||||
import Button from '../../ui/Button';
|
import Button from '../../ui/Button';
|
||||||
|
|
||||||
import './InlineButtons.scss';
|
import './InlineButtons.scss';
|
||||||
@ -24,7 +26,7 @@ const InlineButtons: FC<OwnProps> = ({ message, onClick }) => {
|
|||||||
onClick={() => onClick({ button })}
|
onClick={() => onClick({ button })}
|
||||||
>
|
>
|
||||||
{button.text}
|
{button.text}
|
||||||
{button.type === 'url' && <i className="icon-arrow-right" />}
|
{button.type === 'url' && !button.value!.match(RE_TME_LINK) && <i className="icon-arrow-right" />}
|
||||||
</Button>
|
</Button>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -23,7 +23,7 @@ export default function useFocusMessage(
|
|||||||
messagesContainer,
|
messagesContainer,
|
||||||
elementRef.current,
|
elementRef.current,
|
||||||
// `noFocusHighlight` always called from “scroll-to-bottom” buttons
|
// `noFocusHighlight` always called from “scroll-to-bottom” buttons
|
||||||
noFocusHighlight ? 'end' : 'center',
|
noFocusHighlight ? 'end' : 'centerOrTop',
|
||||||
FOCUS_MARGIN,
|
FOCUS_MARGIN,
|
||||||
focusDirection === undefined ? FOCUS_MAX_OFFSET : RELOCATED_FOCUS_OFFSET,
|
focusDirection === undefined ? FOCUS_MAX_OFFSET : RELOCATED_FOCUS_OFFSET,
|
||||||
focusDirection,
|
focusDirection,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user