fix screen navigators
This commit is contained in:
parent
29f554caab
commit
26d8d5b8dc
|
@ -62,6 +62,9 @@ export type ModalStackParamList = {
|
||||||
t: RoomType;
|
t: RoomType;
|
||||||
encrypted?: boolean;
|
encrypted?: boolean;
|
||||||
showCloseModal?: boolean;
|
showCloseModal?: boolean;
|
||||||
|
room?: IRoom;
|
||||||
|
member?: any;
|
||||||
|
joined?: boolean;
|
||||||
};
|
};
|
||||||
SelectedUsersView: {
|
SelectedUsersView: {
|
||||||
maxUsers: number;
|
maxUsers: number;
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { Q } from '@nozbe/watermelondb';
|
||||||
import { dequal } from 'dequal';
|
import { dequal } from 'dequal';
|
||||||
import { withSafeAreaInsets } from 'react-native-safe-area-context';
|
import { withSafeAreaInsets } from 'react-native-safe-area-context';
|
||||||
import { StackNavigationProp } from '@react-navigation/stack';
|
import { StackNavigationProp } from '@react-navigation/stack';
|
||||||
import { RouteProp } from '@react-navigation/core';
|
import { NavigatorScreenParams, RouteProp } from '@react-navigation/core';
|
||||||
|
|
||||||
import Touch from '../../utils/touch';
|
import Touch from '../../utils/touch';
|
||||||
import { replyBroadcast as replyBroadcastAction } from '../../actions/messages';
|
import { replyBroadcast as replyBroadcastAction } from '../../actions/messages';
|
||||||
|
@ -70,6 +70,7 @@ import { IRoom, IRoomModel, RoomType } from '../../definitions/IRoom';
|
||||||
import { IAttachment } from '../../definitions/IAttachment';
|
import { IAttachment } from '../../definitions/IAttachment';
|
||||||
import { IThread } from '../../definitions/IThread';
|
import { IThread } from '../../definitions/IThread';
|
||||||
import { ISubscriptions } from '../../definitions/ISubscriptions';
|
import { ISubscriptions } from '../../definitions/ISubscriptions';
|
||||||
|
import { ModalStackParamList } from '../../stacks/MasterDetailStack/types';
|
||||||
|
|
||||||
const stateAttrsUpdate = [
|
const stateAttrsUpdate = [
|
||||||
'joined',
|
'joined',
|
||||||
|
@ -513,8 +514,7 @@ class RoomView extends React.Component<IRoomViewProps, any> {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// goRoomActionsView = (screen?: keyof ChatsStackParamList) => {
|
goRoomActionsView = (screen?: 'SearchMessagesView' | 'RoomActionsView') => {
|
||||||
goRoomActionsView = (screen?: any) => {
|
|
||||||
logEvent(events.ROOM_GO_RA);
|
logEvent(events.ROOM_GO_RA);
|
||||||
const { room, member, joined } = this.state;
|
const { room, member, joined } = this.state;
|
||||||
const { navigation, isMasterDetail } = this.props;
|
const { navigation, isMasterDetail } = this.props;
|
||||||
|
@ -744,7 +744,7 @@ class RoomView extends React.Component<IRoomViewProps, any> {
|
||||||
logEvent(events.ROOM_ENCRYPTED_PRESS);
|
logEvent(events.ROOM_ENCRYPTED_PRESS);
|
||||||
const { navigation, isMasterDetail } = this.props;
|
const { navigation, isMasterDetail } = this.props;
|
||||||
|
|
||||||
const screen: any = { screen: 'E2EHowItWorksView', params: { showCloseModal: true } };
|
const screen: NavigatorScreenParams<ModalStackParamList> = { screen: 'E2EHowItWorksView', params: { showCloseModal: true } };
|
||||||
|
|
||||||
if (isMasterDetail) {
|
if (isMasterDetail) {
|
||||||
return navigation.navigate('ModalStackNavigator', screen);
|
return navigation.navigate('ModalStackNavigator', screen);
|
||||||
|
|
Loading…
Reference in New Issue