ConversationView: Pull various functions out of getMessageActions
This commit is contained in:
parent
5a98fc2f4c
commit
1e282ee5d0
42 changed files with 440 additions and 570 deletions
|
@ -8,6 +8,7 @@ import { Button, ButtonSize, ButtonVariant } from '../Button';
|
|||
import { ContactName } from './ContactName';
|
||||
import { Intl } from '../Intl';
|
||||
import type { LocalizerType } from '../../types/Util';
|
||||
import { openLinkInWebBrowser } from '../../util/openLinkInWebBrowser';
|
||||
|
||||
export type ContactType = {
|
||||
id: string;
|
||||
|
@ -23,21 +24,16 @@ export type PropsData = {
|
|||
contact: ContactType;
|
||||
};
|
||||
|
||||
export type PropsActions = {
|
||||
downloadNewVersion: () => unknown;
|
||||
};
|
||||
|
||||
type PropsHousekeeping = {
|
||||
i18n: LocalizerType;
|
||||
};
|
||||
|
||||
export type Props = PropsData & PropsHousekeeping & PropsActions;
|
||||
export type Props = PropsData & PropsHousekeeping;
|
||||
|
||||
export function UnsupportedMessage({
|
||||
canProcessNow,
|
||||
contact,
|
||||
i18n,
|
||||
downloadNewVersion,
|
||||
}: Props): JSX.Element {
|
||||
const { isMe } = contact;
|
||||
|
||||
|
@ -75,7 +71,7 @@ export function UnsupportedMessage({
|
|||
<div className="SystemMessage__line">
|
||||
<Button
|
||||
onClick={() => {
|
||||
downloadNewVersion();
|
||||
openLinkInWebBrowser('https://signal.org/download');
|
||||
}}
|
||||
size={ButtonSize.Small}
|
||||
variant={ButtonVariant.SystemMessage}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue