diff --git a/app/definitions/IMessage.ts b/app/definitions/IMessage.ts index 72f923ef6..46c1471ae 100644 --- a/app/definitions/IMessage.ts +++ b/app/definitions/IMessage.ts @@ -151,7 +151,6 @@ export type TMessageModel = IMessage & asPlain: () => IMessage; }; -export type TAnyMessageModel = TMessageModel | TThreadModel | TThreadMessageModel; export type TAnyMessage = IMessage | IThread | IThreadMessage; export type TTypeMessages = IMessageFromServer | ILoadMoreMessage | IMessage; diff --git a/app/stacks/types.ts b/app/stacks/types.ts index cb00e8f1e..8bc24bf80 100644 --- a/app/stacks/types.ts +++ b/app/stacks/types.ts @@ -5,7 +5,7 @@ import { IItem } from '../views/TeamChannelsView'; import { IOptionsField } from '../views/NotificationPreferencesView/options'; import { IServer } from '../definitions/IServer'; import { IAttachment } from '../definitions/IAttachment'; -import { IMessage, TAnyMessageModel, TMessageModel } from '../definitions/IMessage'; +import { IMessage, TAnyMessage, TMessageModel } from '../definitions/IMessage'; import { ISubscription, SubscriptionType, TSubscriptionModel } from '../definitions/ISubscription'; import { ICannedResponse } from '../definitions/ICannedResponse'; import { TDataSelect } from '../definitions/IDataSelect'; @@ -37,7 +37,7 @@ export type ChatsStackParamList = { roomUserId?: string | null; usedCannedResponse?: string; status?: string; - replyInDM?: TAnyMessageModel; + replyInDM?: TAnyMessage; } | undefined; // Navigates back to RoomView already on stack RoomActionsView: { diff --git a/app/views/MessagesView/index.tsx b/app/views/MessagesView/index.tsx index 4ad69d9e7..f90a73e82 100644 --- a/app/views/MessagesView/index.tsx +++ b/app/views/MessagesView/index.tsx @@ -27,7 +27,7 @@ import { SubscriptionType, IAttachment, IMessage, - TAnyMessageModel, + TAnyMessage, IUrl, TGetCustomEmoji, ICustomEmoji @@ -160,7 +160,7 @@ class MessagesView extends React.Component { const { user, baseUrl, theme, useRealName } = this.props; - const renderItemCommonProps = (item: TAnyMessageModel) => ({ + const renderItemCommonProps = (item: TAnyMessage) => ({ item, baseUrl, user, @@ -219,7 +219,7 @@ class MessagesView extends React.Component + renderItem: (item: TAnyMessage) => }, // Starred Messages Screen Starred: { @@ -230,7 +230,7 @@ class MessagesView extends React.Component ( + renderItem: (item: TAnyMessage) => ( this.onLongPress(item)} theme={theme} /> ), action: (message: IMessage) => ({ @@ -249,7 +249,7 @@ class MessagesView extends React.Component ( + renderItem: (item: TAnyMessage) => ( this.onLongPress(item)} theme={theme} /> ), action: () => ({ title: I18n.t('Unpin'), icon: 'pin', onPress: this.handleActionPress }),