creating the IThread interface
This commit is contained in:
parent
d649eb5f4e
commit
63a3e91fd9
|
@ -0,0 +1,6 @@
|
|||
export interface IMention {
|
||||
_id: string;
|
||||
name: string;
|
||||
username: string;
|
||||
type: string;
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
export interface IReaction {
|
||||
_id: string;
|
||||
emoji: string;
|
||||
usernames: string[];
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
import Model from '@nozbe/watermelondb/Model';
|
||||
|
||||
import { IAttachment } from './IAttachment';
|
||||
import { IMention } from './IMention';
|
||||
import { IReaction } from './IReaction';
|
||||
import { RoomType } from './IRoom';
|
||||
import { IUrl } from './IUrl';
|
||||
|
||||
export interface IThread {
|
||||
id: string;
|
||||
msg: string;
|
||||
t: RoomType;
|
||||
rid: string;
|
||||
_updated_at: Date;
|
||||
ts: Date;
|
||||
u: { _id: string; username: string; name: string };
|
||||
alias: any;
|
||||
parse_urls: any;
|
||||
groupable: boolean;
|
||||
avatar: string;
|
||||
emoji: any;
|
||||
attachments: IAttachment[];
|
||||
urls: IUrl[];
|
||||
status: number;
|
||||
pinned: null;
|
||||
starred: null;
|
||||
edited_by: { username: string };
|
||||
reactions: IReaction[];
|
||||
role: null;
|
||||
drid: null;
|
||||
dcount: null;
|
||||
dlm: null;
|
||||
tmid: string;
|
||||
tcount: 2;
|
||||
tlm: Date;
|
||||
replies: string[];
|
||||
mentions: IMention[];
|
||||
channels: [];
|
||||
unread: boolean;
|
||||
auto_translate: boolean;
|
||||
translations: any;
|
||||
e2e: any;
|
||||
}
|
||||
|
||||
export type TThreadModel = IThread & Model;
|
|
@ -0,0 +1,6 @@
|
|||
export interface IUrl {
|
||||
title: string;
|
||||
description: string;
|
||||
image: string;
|
||||
url: string;
|
||||
}
|
|
@ -21,6 +21,7 @@ import List from './List';
|
|||
import NavBottomFAB from './NavBottomFAB';
|
||||
import { ChatsStackParamList } from '../../../stacks/types';
|
||||
import { IRoomItem } from '../index';
|
||||
import { IThread } from '../../../definitions/IThread';
|
||||
|
||||
const QUERY_SIZE = 50;
|
||||
|
||||
|
@ -61,7 +62,7 @@ class ListContainer extends React.Component<IRoomListContainerProps, any> {
|
|||
private unsubscribeFocus: any;
|
||||
private viewabilityConfig: { itemVisiblePercentThreshold: number };
|
||||
private highlightedMessageTimeout: any;
|
||||
private thread: any;
|
||||
private thread?: IThread;
|
||||
private messagesObservable?: Observable<Model>;
|
||||
private messagesSubscription?: Subscription;
|
||||
private viewableItems: any;
|
||||
|
|
Loading…
Reference in New Issue