chore: resolving problems with the RightButtons

This commit is contained in:
AlexAlexandre 2021-12-08 00:45:19 -03:00
parent e738f5c80f
commit 1dc978cc88
2 changed files with 6 additions and 5 deletions

View File

@ -3,26 +3,28 @@ import { connect } from 'react-redux';
import { dequal } from 'dequal';
import { Subscription } from 'rxjs';
import Model from '@nozbe/watermelondb/Model';
import { StackNavigationProp } from '@react-navigation/stack';
import * as HeaderButton from '../../containers/HeaderButton';
import database from '../../lib/database';
import { getUserSelector } from '../../selectors/login';
import { events, logEvent } from '../../utils/log';
import { isTeamRoom } from '../../utils/room';
import { ChatsStackParamList } from '../../stacks/types';
import { RoomType } from '../../definitions/IRoom';
interface IRoomRightButtonsContainerProps {
userId: string;
threadsEnabled: boolean;
rid: string;
t: string;
t: RoomType;
tmid?: string;
teamId: string;
navigation: any; // TODO - change this after merge react navigation
navigation: StackNavigationProp<ChatsStackParamList>;
isMasterDetail: boolean;
toggleFollowThread: Function;
joined: boolean;
encrypted: boolean;
teamMain?: string; // TODO - verify if this props exist
}
class RightButtonsContainer extends Component<IRoomRightButtonsContainerProps, any> {
@ -147,7 +149,7 @@ class RightButtonsContainer extends Component<IRoomRightButtonsContainerProps, a
if (isMasterDetail) {
navigation.navigate('ModalStackNavigator', {
screen: 'SearchMessagesView',
params: { rid, showCloseModal: true, encrypted }
params: { rid, t, showCloseModal: true, encrypted }
});
} else {
navigation.navigate('SearchMessagesView', { rid, t, encrypted });

View File

@ -489,7 +489,6 @@ class RoomView extends React.Component<IRoomViewProps, any> {
rid={rid}
tmid={tmid}
teamId={teamId}
teamMain={teamMain}
joined={joined}
t={t}
encrypted={encrypted}