Automatic session reset

This commit is contained in:
Scott Nonnenberg 2021-02-18 08:40:26 -08:00 committed by Josh Perez
parent fe187226bb
commit 98e7e65d25
26 changed files with 803 additions and 225 deletions

View file

@ -10,11 +10,14 @@ import {
PropsActions as MessageActionsType,
PropsData as MessageProps,
} from './Message';
import {
CallingNotification,
PropsActionsType as CallingNotificationActionsType,
} from './CallingNotification';
import {
ChatSessionRefreshedNotification,
PropsActionsType as PropsChatSessionRefreshedActionsType,
} from './ChatSessionRefreshedNotification';
import { CallingNotificationType } from '../../util/callingNotification';
import { InlineNotificationWrapper } from './InlineNotificationWrapper';
import {
@ -58,6 +61,10 @@ type CallHistoryType = {
type: 'callHistory';
data: CallingNotificationType;
};
type ChatSessionRefreshedType = {
type: 'chatSessionRefreshed';
data: null;
};
type LinkNotificationType = {
type: 'linkNotification';
data: null;
@ -105,6 +112,7 @@ type ProfileChangeNotificationType = {
export type TimelineItemType =
| CallHistoryType
| ChatSessionRefreshedType
| GroupNotificationType
| GroupV1MigrationType
| GroupV2ChangeType
@ -131,6 +139,7 @@ type PropsLocalType = {
type PropsActionsType = MessageActionsType &
CallingNotificationActionsType &
PropsChatSessionRefreshedActionsType &
UnsupportedMessageActionsType &
SafetyNumberActionsType;
@ -184,6 +193,14 @@ export class TimelineItem extends React.PureComponent<PropsType> {
{...item.data}
/>
);
} else if (item.type === 'chatSessionRefreshed') {
notification = (
<ChatSessionRefreshedNotification
{...this.props}
{...item.data}
i18n={i18n}
/>
);
} else if (item.type === 'linkNotification') {
notification = (
<div className="module-message-unsynced">