Chore: Create app/lib/navigation folder (#4027)
* change Navigation to appNavigation and move to navigation folder * change ShareNavigation to shareNavigation and move to navigation folder * fix navigation import Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
parent
7d2ae5ea7c
commit
474ea98a3b
|
@ -4,7 +4,7 @@ import { createStackNavigator } from '@react-navigation/stack';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
import { SetUsernameStackParamList, StackParamList } from './definitions/navigationTypes';
|
import { SetUsernameStackParamList, StackParamList } from './definitions/navigationTypes';
|
||||||
import Navigation from './lib/Navigation';
|
import Navigation from './lib/navigation/appNavigation';
|
||||||
import { defaultHeader, getActiveRouteName, navigationTheme } from './utils/navigation';
|
import { defaultHeader, getActiveRouteName, navigationTheme } from './utils/navigation';
|
||||||
import { RootEnum } from './definitions';
|
import { RootEnum } from './definitions';
|
||||||
// Stacks
|
// Stacks
|
||||||
|
|
|
@ -12,7 +12,7 @@ import { themes } from '../../constants/colors';
|
||||||
import { useTheme } from '../../theme';
|
import { useTheme } from '../../theme';
|
||||||
import { ROW_HEIGHT } from '../../presentation/RoomItem';
|
import { ROW_HEIGHT } from '../../presentation/RoomItem';
|
||||||
import { goRoom } from '../../utils/goRoom';
|
import { goRoom } from '../../utils/goRoom';
|
||||||
import Navigation from '../../lib/Navigation';
|
import Navigation from '../../lib/navigation/appNavigation';
|
||||||
import { useOrientation } from '../../dimensions';
|
import { useOrientation } from '../../dimensions';
|
||||||
import { IApplicationState, ISubscription, SubscriptionType } from '../../definitions';
|
import { IApplicationState, ISubscription, SubscriptionType } from '../../definitions';
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { dequal } from 'dequal';
|
||||||
|
|
||||||
import NotifierComponent, { INotifierComponent } from './NotifierComponent';
|
import NotifierComponent, { INotifierComponent } from './NotifierComponent';
|
||||||
import EventEmitter from '../../utils/events';
|
import EventEmitter from '../../utils/events';
|
||||||
import Navigation from '../../lib/Navigation';
|
import Navigation from '../../lib/navigation/appNavigation';
|
||||||
import { getActiveRoute } from '../../utils/navigation';
|
import { getActiveRoute } from '../../utils/navigation';
|
||||||
import { IApplicationState } from '../../definitions';
|
import { IApplicationState } from '../../definitions';
|
||||||
import { IRoom } from '../../reducers/room';
|
import { IRoom } from '../../reducers/room';
|
||||||
|
|
|
@ -8,7 +8,7 @@ import RocketChat from '../../lib/rocketchat';
|
||||||
import database from '../../lib/database';
|
import database from '../../lib/database';
|
||||||
import I18n from '../../i18n';
|
import I18n from '../../i18n';
|
||||||
import log, { logEvent } from '../../utils/log';
|
import log, { logEvent } from '../../utils/log';
|
||||||
import Navigation from '../../lib/Navigation';
|
import Navigation from '../../lib/navigation/appNavigation';
|
||||||
import { getMessageTranslation } from '../message/utils';
|
import { getMessageTranslation } from '../message/utils';
|
||||||
import { LISTENER } from '../Toast';
|
import { LISTENER } from '../Toast';
|
||||||
import EventEmitter from '../../utils/events';
|
import EventEmitter from '../../utils/events';
|
||||||
|
|
|
@ -44,7 +44,7 @@ import {
|
||||||
} from './constants';
|
} from './constants';
|
||||||
import CommandsPreview from './CommandsPreview';
|
import CommandsPreview from './CommandsPreview';
|
||||||
import { getUserSelector } from '../../selectors/login';
|
import { getUserSelector } from '../../selectors/login';
|
||||||
import Navigation from '../../lib/Navigation';
|
import Navigation from '../../lib/navigation/appNavigation';
|
||||||
import { withActionSheet } from '../ActionSheet';
|
import { withActionSheet } from '../ActionSheet';
|
||||||
import { sanitizeLikeString } from '../../lib/database/utils';
|
import { sanitizeLikeString } from '../../lib/database/utils';
|
||||||
import { CustomIcon } from '../../lib/Icons';
|
import { CustomIcon } from '../../lib/Icons';
|
||||||
|
|
|
@ -4,7 +4,7 @@ import FastImage from '@rocket.chat/react-native-fast-image';
|
||||||
import { BLOCK_CONTEXT } from '@rocket.chat/ui-kit';
|
import { BLOCK_CONTEXT } from '@rocket.chat/ui-kit';
|
||||||
|
|
||||||
import ImageContainer from '../message/Image';
|
import ImageContainer from '../message/Image';
|
||||||
import Navigation from '../../lib/Navigation';
|
import Navigation from '../../lib/navigation/appNavigation';
|
||||||
import { IThumb, IImage, IElement } from './interfaces';
|
import { IThumb, IImage, IElement } from './interfaces';
|
||||||
import { IAttachment } from '../../definitions';
|
import { IAttachment } from '../../definitions';
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { ScrollView, Text, TouchableOpacity, View, ViewStyle } from 'react-nativ
|
||||||
|
|
||||||
import { CELL_WIDTH } from './TableCell';
|
import { CELL_WIDTH } from './TableCell';
|
||||||
import styles from './styles';
|
import styles from './styles';
|
||||||
import Navigation from '../../lib/Navigation';
|
import Navigation from '../../lib/navigation/appNavigation';
|
||||||
import I18n from '../../i18n';
|
import I18n from '../../i18n';
|
||||||
import { themes } from '../../constants/colors';
|
import { themes } from '../../constants/colors';
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { TRocketChat } from '../../definitions/IRocketChat';
|
||||||
import EventEmitter from '../../utils/events';
|
import EventEmitter from '../../utils/events';
|
||||||
import fetch from '../../utils/fetch';
|
import fetch from '../../utils/fetch';
|
||||||
import random from '../../utils/random';
|
import random from '../../utils/random';
|
||||||
import Navigation from '../Navigation';
|
import Navigation from '../navigation/appNavigation';
|
||||||
import sdk from '../rocketchat/services/sdk';
|
import sdk from '../rocketchat/services/sdk';
|
||||||
|
|
||||||
const triggersId = new Map();
|
const triggersId = new Map();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { ISubscription } from '../../../definitions';
|
import { ISubscription } from '../../../definitions';
|
||||||
import { events, logEvent } from '../../../utils/log';
|
import { events, logEvent } from '../../../utils/log';
|
||||||
import { store } from '../../auxStore';
|
import { store } from '../../auxStore';
|
||||||
import Navigation from '../../Navigation';
|
import Navigation from '../../navigation/appNavigation';
|
||||||
import sdk from '../services/sdk';
|
import sdk from '../services/sdk';
|
||||||
|
|
||||||
async function jitsiURL({ room }: { room: ISubscription }) {
|
async function jitsiURL({ room }: { room: ISubscription }) {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import {
|
||||||
} from '../../../containers/UIKit/interfaces';
|
} from '../../../containers/UIKit/interfaces';
|
||||||
import { TRocketChat } from '../../../definitions';
|
import { TRocketChat } from '../../../definitions';
|
||||||
import { triggerAction } from '../../methods/actions';
|
import { triggerAction } from '../../methods/actions';
|
||||||
import Navigation from '../../Navigation';
|
import Navigation from '../../navigation/appNavigation';
|
||||||
|
|
||||||
export function triggerBlockAction(this: TRocketChat, options: ITriggerBlockAction) {
|
export function triggerBlockAction(this: TRocketChat, options: ITriggerBlockAction) {
|
||||||
return triggerAction.call(this, { type: ActionTypes.ACTION, ...options });
|
return triggerAction.call(this, { type: ActionTypes.ACTION, ...options });
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { CREATE_CHANNEL, LOGIN } from '../actions/actionsTypes';
|
||||||
import { createChannelFailure, createChannelSuccess } from '../actions/createChannel';
|
import { createChannelFailure, createChannelSuccess } from '../actions/createChannel';
|
||||||
import { showErrorAlert } from '../utils/info';
|
import { showErrorAlert } from '../utils/info';
|
||||||
import RocketChat from '../lib/rocketchat';
|
import RocketChat from '../lib/rocketchat';
|
||||||
import Navigation from '../lib/Navigation';
|
import Navigation from '../lib/navigation/appNavigation';
|
||||||
import database from '../lib/database';
|
import database from '../lib/database';
|
||||||
import I18n from '../i18n';
|
import I18n from '../i18n';
|
||||||
import { events, logEvent } from '../utils/log';
|
import { events, logEvent } from '../utils/log';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { all, delay, put, select, take, takeLatest } from 'redux-saga/effects';
|
import { all, delay, put, select, take, takeLatest } from 'redux-saga/effects';
|
||||||
|
|
||||||
import UserPreferences from '../lib/methods/userPreferences';
|
import UserPreferences from '../lib/methods/userPreferences';
|
||||||
import Navigation from '../lib/Navigation';
|
import Navigation from '../lib/navigation/appNavigation';
|
||||||
import * as types from '../actions/actionsTypes';
|
import * as types from '../actions/actionsTypes';
|
||||||
import { selectServerRequest, serverInitAdd } from '../actions/server';
|
import { selectServerRequest, serverInitAdd } from '../actions/server';
|
||||||
import { inviteLinksRequest, inviteLinksSetToken } from '../actions/inviteLinks';
|
import { inviteLinksRequest, inviteLinksSetToken } from '../actions/inviteLinks';
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { put, select, takeLatest } from 'redux-saga/effects';
|
||||||
import { ENCRYPTION } from '../actions/actionsTypes';
|
import { ENCRYPTION } from '../actions/actionsTypes';
|
||||||
import { encryptionSet } from '../actions/encryption';
|
import { encryptionSet } from '../actions/encryption';
|
||||||
import { Encryption } from '../lib/encryption';
|
import { Encryption } from '../lib/encryption';
|
||||||
import Navigation from '../lib/Navigation';
|
import Navigation from '../lib/navigation/appNavigation';
|
||||||
import { E2E_BANNER_TYPE, E2E_PRIVATE_KEY, E2E_PUBLIC_KEY, E2E_RANDOM_PASSWORD_KEY } from '../lib/constants';
|
import { E2E_BANNER_TYPE, E2E_PRIVATE_KEY, E2E_PUBLIC_KEY, E2E_RANDOM_PASSWORD_KEY } from '../lib/constants';
|
||||||
import database from '../lib/database';
|
import database from '../lib/database';
|
||||||
import RocketChat from '../lib/rocketchat';
|
import RocketChat from '../lib/rocketchat';
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { INVITE_LINKS } from '../actions/actionsTypes';
|
||||||
import { inviteLinksFailure, inviteLinksSetInvite, inviteLinksSuccess } from '../actions/inviteLinks';
|
import { inviteLinksFailure, inviteLinksSetInvite, inviteLinksSuccess } from '../actions/inviteLinks';
|
||||||
import RocketChat from '../lib/rocketchat';
|
import RocketChat from '../lib/rocketchat';
|
||||||
import log from '../utils/log';
|
import log from '../utils/log';
|
||||||
import Navigation from '../lib/Navigation';
|
import Navigation from '../lib/navigation/appNavigation';
|
||||||
import I18n from '../i18n';
|
import I18n from '../i18n';
|
||||||
|
|
||||||
const handleRequest = function* handleRequest({ token }) {
|
const handleRequest = function* handleRequest({ token }) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { select, takeLatest } from 'redux-saga/effects';
|
import { select, takeLatest } from 'redux-saga/effects';
|
||||||
import { Q } from '@nozbe/watermelondb';
|
import { Q } from '@nozbe/watermelondb';
|
||||||
|
|
||||||
import Navigation from '../lib/Navigation';
|
import Navigation from '../lib/navigation/appNavigation';
|
||||||
import { MESSAGES } from '../actions/actionsTypes';
|
import { MESSAGES } from '../actions/actionsTypes';
|
||||||
import RocketChat from '../lib/rocketchat';
|
import RocketChat from '../lib/rocketchat';
|
||||||
import database from '../lib/database';
|
import database from '../lib/database';
|
||||||
|
|
|
@ -3,7 +3,7 @@ import prompt from 'react-native-prompt-android';
|
||||||
import { delay, put, race, select, take, takeLatest } from 'redux-saga/effects';
|
import { delay, put, race, select, take, takeLatest } from 'redux-saga/effects';
|
||||||
|
|
||||||
import EventEmitter from '../utils/events';
|
import EventEmitter from '../utils/events';
|
||||||
import Navigation from '../lib/Navigation';
|
import Navigation from '../lib/navigation/appNavigation';
|
||||||
import * as types from '../actions/actionsTypes';
|
import * as types from '../actions/actionsTypes';
|
||||||
import { removedRoom } from '../actions/room';
|
import { removedRoom } from '../actions/room';
|
||||||
import RocketChat from '../lib/rocketchat';
|
import RocketChat from '../lib/rocketchat';
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { Q } from '@nozbe/watermelondb';
|
||||||
import valid from 'semver/functions/valid';
|
import valid from 'semver/functions/valid';
|
||||||
import coerce from 'semver/functions/coerce';
|
import coerce from 'semver/functions/coerce';
|
||||||
|
|
||||||
import Navigation from '../lib/Navigation';
|
import Navigation from '../lib/navigation/appNavigation';
|
||||||
import { SERVER } from '../actions/actionsTypes';
|
import { SERVER } from '../actions/actionsTypes';
|
||||||
import { selectServerFailure, selectServerRequest, selectServerSuccess, serverFailure } from '../actions/server';
|
import { selectServerFailure, selectServerRequest, selectServerSuccess, serverFailure } from '../actions/server';
|
||||||
import { clearSettings } from '../actions/settings';
|
import { clearSettings } from '../actions/settings';
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { Provider } from 'react-redux';
|
||||||
|
|
||||||
import { getTheme, initialTheme, newThemeState, subscribeTheme, unsubscribeTheme } from './utils/theme';
|
import { getTheme, initialTheme, newThemeState, subscribeTheme, unsubscribeTheme } from './utils/theme';
|
||||||
import UserPreferences from './lib/methods/userPreferences';
|
import UserPreferences from './lib/methods/userPreferences';
|
||||||
import Navigation from './lib/ShareNavigation';
|
import Navigation from './lib/navigation/shareNavigation';
|
||||||
import store from './lib/createStore';
|
import store from './lib/createStore';
|
||||||
import { initStore } from './lib/auxStore';
|
import { initStore } from './lib/auxStore';
|
||||||
import { closeShareExtension, shareExtensionInit } from './lib/rocketchat/services/shareExtension';
|
import { closeShareExtension, shareExtensionInit } from './lib/rocketchat/services/shareExtension';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { ChatsStackParamList } from '../stacks/types';
|
import { ChatsStackParamList } from '../stacks/types';
|
||||||
import Navigation from '../lib/Navigation';
|
import Navigation from '../lib/navigation/appNavigation';
|
||||||
import RocketChat from '../lib/rocketchat';
|
import RocketChat from '../lib/rocketchat';
|
||||||
import { IOmnichannelRoom, SubscriptionType, IVisitor, TSubscriptionModel, ISubscription } from '../definitions';
|
import { IOmnichannelRoom, SubscriptionType, IVisitor, TSubscriptionModel, ISubscription } from '../definitions';
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import StatusBar from '../containers/StatusBar';
|
||||||
import Button from '../containers/Button';
|
import Button from '../containers/Button';
|
||||||
import { useTheme } from '../theme';
|
import { useTheme } from '../theme';
|
||||||
import RocketChat from '../lib/rocketchat';
|
import RocketChat from '../lib/rocketchat';
|
||||||
import Navigation from '../lib/Navigation';
|
import Navigation from '../lib/navigation/appNavigation';
|
||||||
import { goRoom } from '../utils/goRoom';
|
import { goRoom } from '../utils/goRoom';
|
||||||
import { themes } from '../constants/colors';
|
import { themes } from '../constants/colors';
|
||||||
import Markdown from '../containers/markdown';
|
import Markdown from '../containers/markdown';
|
||||||
|
|
|
@ -16,7 +16,7 @@ import { getHeaderTitlePosition } from '../../containers/Header';
|
||||||
import { useTheme } from '../../theme';
|
import { useTheme } from '../../theme';
|
||||||
import RocketChat from '../../lib/rocketchat';
|
import RocketChat from '../../lib/rocketchat';
|
||||||
import debounce from '../../utils/debounce';
|
import debounce from '../../utils/debounce';
|
||||||
import Navigation from '../../lib/Navigation';
|
import Navigation from '../../lib/navigation/appNavigation';
|
||||||
import { goRoom } from '../../utils/goRoom';
|
import { goRoom } from '../../utils/goRoom';
|
||||||
import * as HeaderButton from '../../containers/HeaderButton';
|
import * as HeaderButton from '../../containers/HeaderButton';
|
||||||
import * as List from '../../containers/List';
|
import * as List from '../../containers/List';
|
||||||
|
|
|
@ -14,7 +14,7 @@ import { withTheme } from '../../theme';
|
||||||
import { getUserSelector } from '../../selectors/login';
|
import { getUserSelector } from '../../selectors/login';
|
||||||
import TextInput from '../../containers/TextInput';
|
import TextInput from '../../containers/TextInput';
|
||||||
import RocketChat from '../../lib/rocketchat';
|
import RocketChat from '../../lib/rocketchat';
|
||||||
import Navigation from '../../lib/Navigation';
|
import Navigation from '../../lib/navigation/appNavigation';
|
||||||
import { createDiscussionRequest } from '../../actions/createDiscussion';
|
import { createDiscussionRequest } from '../../actions/createDiscussion';
|
||||||
import { showErrorAlert } from '../../utils/info';
|
import { showErrorAlert } from '../../utils/info';
|
||||||
import SafeAreaView from '../../containers/SafeAreaView';
|
import SafeAreaView from '../../containers/SafeAreaView';
|
||||||
|
|
|
@ -13,7 +13,7 @@ import { modalBlockWithContext } from '../containers/UIKit/MessageBlock';
|
||||||
import RocketChat from '../lib/rocketchat';
|
import RocketChat from '../lib/rocketchat';
|
||||||
import ActivityIndicator from '../containers/ActivityIndicator';
|
import ActivityIndicator from '../containers/ActivityIndicator';
|
||||||
import { textParser } from '../containers/UIKit/utils';
|
import { textParser } from '../containers/UIKit/utils';
|
||||||
import Navigation from '../lib/Navigation';
|
import Navigation from '../lib/navigation/appNavigation';
|
||||||
import { MasterDetailInsideStackParamList } from '../stacks/MasterDetailStack/types';
|
import { MasterDetailInsideStackParamList } from '../stacks/MasterDetailStack/types';
|
||||||
import { ContainerTypes, ModalActions } from '../containers/UIKit/interfaces';
|
import { ContainerTypes, ModalActions } from '../containers/UIKit/interfaces';
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@ import { IApplicationState, IBaseScreen, ISearch, TSubscriptionModel } from '../
|
||||||
import I18n from '../i18n';
|
import I18n from '../i18n';
|
||||||
import database from '../lib/database';
|
import database from '../lib/database';
|
||||||
import { CustomIcon } from '../lib/Icons';
|
import { CustomIcon } from '../lib/Icons';
|
||||||
|
import Navigation from '../lib/navigation/appNavigation';
|
||||||
import { compareServerVersion } from '../lib/methods/helpers/compareServerVersion';
|
import { compareServerVersion } from '../lib/methods/helpers/compareServerVersion';
|
||||||
import Navigation from '../lib/Navigation';
|
|
||||||
import RocketChat from '../lib/rocketchat';
|
import RocketChat from '../lib/rocketchat';
|
||||||
import UserItem from '../presentation/UserItem';
|
import UserItem from '../presentation/UserItem';
|
||||||
import { withTheme } from '../theme';
|
import { withTheme } from '../theme';
|
||||||
|
|
|
@ -25,7 +25,7 @@ import { LISTENER } from '../../containers/Toast';
|
||||||
import EventEmitter from '../../utils/events';
|
import EventEmitter from '../../utils/events';
|
||||||
import SafeAreaView from '../../containers/SafeAreaView';
|
import SafeAreaView from '../../containers/SafeAreaView';
|
||||||
import { goRoom } from '../../utils/goRoom';
|
import { goRoom } from '../../utils/goRoom';
|
||||||
import Navigation from '../../lib/Navigation';
|
import Navigation from '../../lib/navigation/appNavigation';
|
||||||
import Livechat from './Livechat';
|
import Livechat from './Livechat';
|
||||||
import Channel from './Channel';
|
import Channel from './Channel';
|
||||||
import Direct from './Direct';
|
import Direct from './Direct';
|
||||||
|
|
|
@ -44,7 +44,7 @@ import {
|
||||||
import { Review } from '../../utils/review';
|
import { Review } from '../../utils/review';
|
||||||
import RoomClass from '../../lib/methods/subscriptions/room';
|
import RoomClass from '../../lib/methods/subscriptions/room';
|
||||||
import { getUserSelector } from '../../selectors/login';
|
import { getUserSelector } from '../../selectors/login';
|
||||||
import Navigation from '../../lib/Navigation';
|
import Navigation from '../../lib/navigation/appNavigation';
|
||||||
import SafeAreaView from '../../containers/SafeAreaView';
|
import SafeAreaView from '../../containers/SafeAreaView';
|
||||||
import { withDimensions } from '../../dimensions';
|
import { withDimensions } from '../../dimensions';
|
||||||
import { getHeaderTitlePosition } from '../../containers/Header';
|
import { getHeaderTitlePosition } from '../../containers/Header';
|
||||||
|
|
|
@ -15,7 +15,7 @@ import { themes } from '../../constants/colors';
|
||||||
import { withTheme } from '../../theme';
|
import { withTheme } from '../../theme';
|
||||||
import { getUserSelector } from '../../selectors/login';
|
import { getUserSelector } from '../../selectors/login';
|
||||||
import SafeAreaView from '../../containers/SafeAreaView';
|
import SafeAreaView from '../../containers/SafeAreaView';
|
||||||
import Navigation from '../../lib/Navigation';
|
import Navigation from '../../lib/navigation/appNavigation';
|
||||||
import SidebarItem from './SidebarItem';
|
import SidebarItem from './SidebarItem';
|
||||||
import styles from './styles';
|
import styles from './styles';
|
||||||
import { DrawerParamList } from '../../stacks/types';
|
import { DrawerParamList } from '../../stacks/types';
|
||||||
|
|
Loading…
Reference in New Issue