chore: resolving problems with the RightButtons
This commit is contained in:
parent
e738f5c80f
commit
1dc978cc88
|
@ -3,26 +3,28 @@ import { connect } from 'react-redux';
|
||||||
import { dequal } from 'dequal';
|
import { dequal } from 'dequal';
|
||||||
import { Subscription } from 'rxjs';
|
import { Subscription } from 'rxjs';
|
||||||
import Model from '@nozbe/watermelondb/Model';
|
import Model from '@nozbe/watermelondb/Model';
|
||||||
|
import { StackNavigationProp } from '@react-navigation/stack';
|
||||||
|
|
||||||
import * as HeaderButton from '../../containers/HeaderButton';
|
import * as HeaderButton from '../../containers/HeaderButton';
|
||||||
import database from '../../lib/database';
|
import database from '../../lib/database';
|
||||||
import { getUserSelector } from '../../selectors/login';
|
import { getUserSelector } from '../../selectors/login';
|
||||||
import { events, logEvent } from '../../utils/log';
|
import { events, logEvent } from '../../utils/log';
|
||||||
import { isTeamRoom } from '../../utils/room';
|
import { isTeamRoom } from '../../utils/room';
|
||||||
|
import { ChatsStackParamList } from '../../stacks/types';
|
||||||
|
import { RoomType } from '../../definitions/IRoom';
|
||||||
|
|
||||||
interface IRoomRightButtonsContainerProps {
|
interface IRoomRightButtonsContainerProps {
|
||||||
userId: string;
|
userId: string;
|
||||||
threadsEnabled: boolean;
|
threadsEnabled: boolean;
|
||||||
rid: string;
|
rid: string;
|
||||||
t: string;
|
t: RoomType;
|
||||||
tmid?: string;
|
tmid?: string;
|
||||||
teamId: string;
|
teamId: string;
|
||||||
navigation: any; // TODO - change this after merge react navigation
|
navigation: StackNavigationProp<ChatsStackParamList>;
|
||||||
isMasterDetail: boolean;
|
isMasterDetail: boolean;
|
||||||
toggleFollowThread: Function;
|
toggleFollowThread: Function;
|
||||||
joined: boolean;
|
joined: boolean;
|
||||||
encrypted: boolean;
|
encrypted: boolean;
|
||||||
teamMain?: string; // TODO - verify if this props exist
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class RightButtonsContainer extends Component<IRoomRightButtonsContainerProps, any> {
|
class RightButtonsContainer extends Component<IRoomRightButtonsContainerProps, any> {
|
||||||
|
@ -147,7 +149,7 @@ class RightButtonsContainer extends Component<IRoomRightButtonsContainerProps, a
|
||||||
if (isMasterDetail) {
|
if (isMasterDetail) {
|
||||||
navigation.navigate('ModalStackNavigator', {
|
navigation.navigate('ModalStackNavigator', {
|
||||||
screen: 'SearchMessagesView',
|
screen: 'SearchMessagesView',
|
||||||
params: { rid, showCloseModal: true, encrypted }
|
params: { rid, t, showCloseModal: true, encrypted }
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
navigation.navigate('SearchMessagesView', { rid, t, encrypted });
|
navigation.navigate('SearchMessagesView', { rid, t, encrypted });
|
||||||
|
|
|
@ -489,7 +489,6 @@ class RoomView extends React.Component<IRoomViewProps, any> {
|
||||||
rid={rid}
|
rid={rid}
|
||||||
tmid={tmid}
|
tmid={tmid}
|
||||||
teamId={teamId}
|
teamId={teamId}
|
||||||
teamMain={teamMain}
|
|
||||||
joined={joined}
|
joined={joined}
|
||||||
t={t}
|
t={t}
|
||||||
encrypted={encrypted}
|
encrypted={encrypted}
|
||||||
|
|
Loading…
Reference in New Issue