Sort by inbox position to match phone after link

This commit is contained in:
Josh Perez 2020-03-09 17:43:09 -07:00 committed by Scott Nonnenberg
parent 1f5cb9e8af
commit 4830213a12
25 changed files with 707 additions and 1029 deletions

View file

@ -32,6 +32,10 @@ import {
} from './GroupNotification';
import { ResetSessionNotification } from './ResetSessionNotification';
type LinkNotificationType = {
type: 'linkNotification';
data: null;
};
type MessageType = {
type: 'message';
data: MessageProps;
@ -61,12 +65,13 @@ type ResetSessionNotificationType = {
data: null;
};
export type TimelineItemType =
| LinkNotificationType
| MessageType
| UnsupportedMessageType
| TimerNotificationType
| SafetyNumberNotificationType
| VerificationNotificationType
| ResetSessionNotificationType
| SafetyNumberNotificationType
| TimerNotificationType
| UnsupportedMessageType
| VerificationNotificationType
| GroupNotificationType;
type PropsLocalType = {
@ -112,6 +117,13 @@ export class TimelineItem extends React.PureComponent<PropsType> {
notification = (
<UnsupportedMessage {...this.props} {...item.data} i18n={i18n} />
);
} else if (item.type === 'linkNotification') {
notification = (
<div className="module-message-unsynced">
<div className="module-message-unsynced__icon" />
{i18n('messageHistoryUnsynced')}
</div>
);
} else if (item.type === 'timerNotification') {
notification = (
<TimerNotification {...this.props} {...item.data} i18n={i18n} />