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 { RE_TME_LINK } from '../../../config';
|
||||
|
||||
import Button from '../../ui/Button';
|
||||
|
||||
import './InlineButtons.scss';
|
||||
@ -24,7 +26,7 @@ const InlineButtons: FC<OwnProps> = ({ message, onClick }) => {
|
||||
onClick={() => onClick({ button })}
|
||||
>
|
||||
{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>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@ -23,7 +23,7 @@ export default function useFocusMessage(
|
||||
messagesContainer,
|
||||
elementRef.current,
|
||||
// `noFocusHighlight` always called from “scroll-to-bottom” buttons
|
||||
noFocusHighlight ? 'end' : 'center',
|
||||
noFocusHighlight ? 'end' : 'centerOrTop',
|
||||
FOCUS_MARGIN,
|
||||
focusDirection === undefined ? FOCUS_MAX_OFFSET : RELOCATED_FOCUS_OFFSET,
|
||||
focusDirection,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user