Minor tweaks
This commit is contained in:
parent
47f7ee8c91
commit
ffb17d603e
|
@ -102,11 +102,11 @@ const MessageTouchable = React.memo((props: IMessageTouchable & IMessage) => {
|
|||
</View>
|
||||
);
|
||||
}
|
||||
const { onPress, onLongPress } = useContext(MessageContext);
|
||||
const { onPress, onLongPress, onDiscussionPress } = useContext(MessageContext);
|
||||
return (
|
||||
<Touchable
|
||||
onLongPress={onLongPress}
|
||||
onPress={onPress}
|
||||
onPress={() => (props.type !== 'discussion-created' ? onPress() : onDiscussionPress())}
|
||||
disabled={(props.isInfo && !props.isThreadReply) || props.archived || props.isTemp}
|
||||
style={{ backgroundColor: props.highlighted ? themes[props.theme].headerBackground : null }}>
|
||||
<View>
|
||||
|
|
|
@ -138,7 +138,7 @@ export interface IMessageInner
|
|||
IMessageThread,
|
||||
IMessageAttachments,
|
||||
IMessageBroadcast {
|
||||
type: string;
|
||||
type: 'discussion-created' | 'jitsi_call_started' | 'c' | 'd' | 'p' | 'l';
|
||||
blocks: [];
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ interface IThemeContextProps {
|
|||
|
||||
export const ThemeContext = React.createContext<IThemeContextProps>({ theme: 'light' });
|
||||
|
||||
export function withTheme(Component: React.ComponentType<any>): (props: any) => JSX.Element {
|
||||
export function withTheme<P extends object>(Component: React.ComponentType<P>): (props: any) => JSX.Element {
|
||||
const ThemedComponent = (props: any) => (
|
||||
<ThemeContext.Consumer>{contexts => <Component {...props} {...contexts} />}</ThemeContext.Consumer>
|
||||
);
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue