From ffb17d603eb8103f32791b33bb5b3b37676fbdc6 Mon Sep 17 00:00:00 2001 From: Gerzon Z Date: Fri, 29 Oct 2021 11:56:57 -0400 Subject: [PATCH] Minor tweaks --- app/containers/message/Message.tsx | 4 ++-- app/containers/message/interfaces.ts | 2 +- app/theme.tsx | 2 +- app/views/DiscussionsView/index.tsx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/containers/message/Message.tsx b/app/containers/message/Message.tsx index 0f24fd879..a7a768854 100644 --- a/app/containers/message/Message.tsx +++ b/app/containers/message/Message.tsx @@ -102,11 +102,11 @@ const MessageTouchable = React.memo((props: IMessageTouchable & IMessage) => { ); } - const { onPress, onLongPress } = useContext(MessageContext); + const { onPress, onLongPress, onDiscussionPress } = useContext(MessageContext); return ( (props.type !== 'discussion-created' ? onPress() : onDiscussionPress())} disabled={(props.isInfo && !props.isThreadReply) || props.archived || props.isTemp} style={{ backgroundColor: props.highlighted ? themes[props.theme].headerBackground : null }}> diff --git a/app/containers/message/interfaces.ts b/app/containers/message/interfaces.ts index 6d0a15369..60286a978 100644 --- a/app/containers/message/interfaces.ts +++ b/app/containers/message/interfaces.ts @@ -138,7 +138,7 @@ export interface IMessageInner IMessageThread, IMessageAttachments, IMessageBroadcast { - type: string; + type: 'discussion-created' | 'jitsi_call_started' | 'c' | 'd' | 'p' | 'l'; blocks: []; } diff --git a/app/theme.tsx b/app/theme.tsx index a304d17df..8618dbd90 100644 --- a/app/theme.tsx +++ b/app/theme.tsx @@ -12,7 +12,7 @@ interface IThemeContextProps { export const ThemeContext = React.createContext({ theme: 'light' }); -export function withTheme(Component: React.ComponentType): (props: any) => JSX.Element { +export function withTheme

(Component: React.ComponentType

): (props: any) => JSX.Element { const ThemedComponent = (props: any) => ( {contexts => } ); diff --git a/app/views/DiscussionsView/index.tsx b/app/views/DiscussionsView/index.tsx index 5205bf6dc..285912d6f 100644 --- a/app/views/DiscussionsView/index.tsx +++ b/app/views/DiscussionsView/index.tsx @@ -179,7 +179,7 @@ const DiscussionsView = ({ navigation, route }: IDiscussionsViewProps): JSX.Elem rid: item.drid, prid: item.rid, name: item.msg, - t: 'p' + t: 'c' }); }, 1000,