diff --git a/app/definitions/index.ts b/app/definitions/index.ts index a5bc02b8f..540d5fc67 100644 --- a/app/definitions/index.ts +++ b/app/definitions/index.ts @@ -37,7 +37,7 @@ export interface IBaseScreen, S ext dispatch: Dispatch; isMasterDetail: boolean; // TODO: remove after migrating all Class components - theme: TSupportedThemes; + theme?: TSupportedThemes; colors: TColors; } diff --git a/app/stacks/InsideStack.tsx b/app/stacks/InsideStack.tsx index 2d8b2c6ae..565f6efff 100644 --- a/app/stacks/InsideStack.tsx +++ b/app/stacks/InsideStack.tsx @@ -95,8 +95,10 @@ const ChatsStackNavigator = () => { + {/* @ts-ignore */} + {/* @ts-ignore */} { options={SearchMessagesView.navigationOptions} /> + {/* @ts-ignore */} + {/* @ts-ignore */} + {/* @ts-ignore */} + {/* @ts-ignore */} + {/* @ts-ignore */} + {/* @ts-ignore */} @@ -127,7 +136,9 @@ const ChatsStackNavigator = () => { component={AddExistingChannelView} options={AddExistingChannelView.navigationOptions} /> + {/* @ts-ignore */} + {/* @ts-ignore */} @@ -152,6 +163,7 @@ const ProfileStackNavigator = () => { + {/* @ts-ignore */} ); @@ -170,6 +182,7 @@ const SettingsStackNavigator = () => { @@ -252,6 +265,7 @@ const NewMessageStackNavigator = () => { + {/* @ts-ignore */} ); @@ -310,6 +324,7 @@ const InsideStackNavigator = () => { + {/* @ts-ignore */} ); diff --git a/app/stacks/MasterDetailStack/index.tsx b/app/stacks/MasterDetailStack/index.tsx index dd7cc4d1a..84bd788b0 100644 --- a/app/stacks/MasterDetailStack/index.tsx +++ b/app/stacks/MasterDetailStack/index.tsx @@ -125,8 +125,11 @@ const ModalStackNavigator = React.memo(({ navigation }: INavigation) => { screenOptions={{ ...defaultHeader, ...themedHeader(theme), ...StackAnimation } as StackNavigationOptions} > + {/* @ts-ignore */} + {/* @ts-ignore */} + {/* @ts-ignore */} { options={SearchMessagesView.navigationOptions} /> + {/* @ts-ignore */} + {/* @ts-ignore */} { /> + {/* @ts-ignore */} + {/* @ts-ignore */} + {/* @ts-ignore */} + {/* @ts-ignore */} + {/* @ts-ignore */} + {/* @ts-ignore */} + {/* @ts-ignore */} + {/* @ts-ignore */} ReadReceiptsView.navigationOptions!({ ...props, isMasterDetail: true })} /> @@ -183,6 +198,7 @@ const ModalStackNavigator = React.memo(({ navigation }: INavigation) => { + {/* @ts-ignore */} @@ -192,6 +208,7 @@ const ModalStackNavigator = React.memo(({ navigation }: INavigation) => { @@ -218,6 +235,7 @@ const InsideStackNavigator = React.memo(() => { + {/* @ts-ignore */} { return ( + {/* @ts-ignore */} + {/* @ts-ignore */} + {/* @ts-ignore */} + {/* @ts-ignore */} + {/* @ts-ignore */} ); diff --git a/app/stacks/types.ts b/app/stacks/types.ts index 3e422afa1..d73b40f6e 100644 --- a/app/stacks/types.ts +++ b/app/stacks/types.ts @@ -142,7 +142,7 @@ export type ChatsStackParamList = { }; LivechatEditView: { room: ISubscription; - roomUser: any; // TODO: Change + roomUser?: any; // TODO: Change }; PickerView: { title: string; @@ -267,7 +267,7 @@ export type E2ESaveYourPasswordStackParamList = { }; export type E2EEnterYourPasswordStackParamList = { - E2EEnterYourPasswordView: undefined; + E2EEnterYourPasswordView?: undefined; }; export type InsideStackParamList = { diff --git a/app/views/AddExistingChannelView.tsx b/app/views/AddExistingChannelView.tsx index 88aa83f15..6c4366ea8 100644 --- a/app/views/AddExistingChannelView.tsx +++ b/app/views/AddExistingChannelView.tsx @@ -32,7 +32,7 @@ interface IAddExistingChannelViewState { interface IAddExistingChannelViewProps { navigation: StackNavigationProp; route: RouteProp; - theme: TSupportedThemes; + theme?: TSupportedThemes; isMasterDetail: boolean; addTeamChannelPermission?: string[]; } @@ -193,7 +193,7 @@ class AddExistingChannelView extends React.Component ); diff --git a/app/views/AttachmentView.tsx b/app/views/AttachmentView.tsx index b70e7ab5a..36cf43c14 100644 --- a/app/views/AttachmentView.tsx +++ b/app/views/AttachmentView.tsx @@ -40,11 +40,11 @@ interface IAttachmentViewState { interface IAttachmentViewProps { navigation: StackNavigationProp; route: RouteProp; - theme: TSupportedThemes; + theme?: TSupportedThemes; baseUrl: string; - width: number; - height: number; - insets: { left: number; bottom: number; right: number; top: number }; + width?: number; + height?: number; + insets?: { left: number; bottom: number; right: number; top: number }; user: IUser; Allow_Save_Media_to_Gallery: boolean; } @@ -89,20 +89,20 @@ class AttachmentView extends React.Component ( - + ), headerRight: () => Allow_Save_Media_to_Gallery ? ( - + ) : null, headerBackground: () => ( - + ) }; navigation.setOptions(options); @@ -160,8 +160,8 @@ class AttachmentView extends React.Component this.setState({ loading: false })} - width={width} - height={height - insets.top - insets.bottom - (headerHeight || 0)} + width={width!} + height={height! - insets!.top - insets!.bottom - (headerHeight || 0)} /> )} @@ -199,8 +199,8 @@ class AttachmentView extends React.Component - + + {content} {loading ? : null} diff --git a/app/views/AuthenticationWebView.tsx b/app/views/AuthenticationWebView.tsx index 340f291a6..30b8ff190 100644 --- a/app/views/AuthenticationWebView.tsx +++ b/app/views/AuthenticationWebView.tsx @@ -9,7 +9,6 @@ import { RouteProp } from '@react-navigation/core'; import { OutsideModalParamList } from '../stacks/types'; import StatusBar from '../containers/StatusBar'; import ActivityIndicator from '../containers/ActivityIndicator'; -import { TSupportedThemes, withTheme } from '../theme'; import { debounce, isIOS } from '../lib/methods/helpers'; import * as HeaderButton from '../containers/HeaderButton'; import { Services } from '../lib/services'; @@ -52,7 +51,6 @@ interface IAuthenticationWebView extends INavigationOption { server: string; Accounts_Iframe_api_url: string; Accounts_Iframe_api_method: string; - theme: TSupportedThemes; } interface IState { @@ -203,9 +201,9 @@ class AuthenticationWebView extends React.PureComponent ({ - server: state.server.server, + server: state.server.server as string, Accounts_Iframe_api_url: state.settings.Accounts_Iframe_api_url as string, Accounts_Iframe_api_method: state.settings.Accounts_Iframe_api_method as string }); -export default connect(mapStateToProps)(withTheme(AuthenticationWebView)); +export default connect(mapStateToProps)(AuthenticationWebView); diff --git a/app/views/AutoTranslateView/index.tsx b/app/views/AutoTranslateView/index.tsx index 523c63da5..daa0f40da 100644 --- a/app/views/AutoTranslateView/index.tsx +++ b/app/views/AutoTranslateView/index.tsx @@ -108,7 +108,7 @@ class AutoTranslateView extends React.Component { renderIcon = () => { const { theme } = this.props; - return ; + return ; }; renderSwitch = () => { diff --git a/app/views/CreateDiscussionView/index.tsx b/app/views/CreateDiscussionView/index.tsx index 9ce8e1fbe..84bfc9e4f 100644 --- a/app/views/CreateDiscussionView/index.tsx +++ b/app/views/CreateDiscussionView/index.tsx @@ -144,14 +144,14 @@ class CreateChannelView extends React.Component - {I18n.t('Discussion_Desc')} + {I18n.t('Discussion_Desc')} {this.isEncryptionEnabled ? ( <> - {I18n.t('Encrypted')} + {I18n.t('Encrypted')} ) : null} diff --git a/app/views/DirectoryView/index.tsx b/app/views/DirectoryView/index.tsx index 6d4ce59d4..4f7d542d1 100644 --- a/app/views/DirectoryView/index.tsx +++ b/app/views/DirectoryView/index.tsx @@ -36,7 +36,7 @@ interface IDirectoryViewProps { baseUrl: string; isFederationEnabled: boolean; user: IUser; - theme: TSupportedThemes; + theme?: TSupportedThemes; directoryDefaultView: string; isMasterDetail: boolean; } @@ -210,15 +210,15 @@ class DirectoryView extends React.Component - - {I18n.t(text)} + + {I18n.t(text)} @@ -235,7 +235,7 @@ class DirectoryView extends React.Component + {showOptionsDropdown ? ( - + {I18n.t('E2E_encryption_change_password_title')} - + {I18n.t('E2E_encryption_change_password_description')} + {this.renderChangePassword()} - + {I18n.t('E2E_encryption_reset_title')} - + {I18n.t('E2E_encryption_reset_description')}