2023-09-21 19:05:36 +00:00
|
|
|
import React from 'react';
|
2021-12-03 19:27:57 +00:00
|
|
|
import { createStackNavigator, StackNavigationOptions, StackNavigationProp } from '@react-navigation/stack';
|
2020-06-15 14:00:46 +00:00
|
|
|
import { createDrawerNavigator } from '@react-navigation/drawer';
|
|
|
|
|
|
|
|
import { ThemeContext } from '../../theme';
|
2022-06-06 14:17:51 +00:00
|
|
|
import {
|
|
|
|
FadeFromCenterModal,
|
|
|
|
StackAnimation,
|
|
|
|
defaultHeader,
|
|
|
|
themedHeader,
|
|
|
|
drawerStyle
|
|
|
|
} from '../../lib/methods/helpers/navigation';
|
2020-06-15 14:00:46 +00:00
|
|
|
// Chats Stack
|
|
|
|
import RoomView from '../../views/RoomView';
|
|
|
|
import RoomsListView from '../../views/RoomsListView';
|
|
|
|
import RoomActionsView from '../../views/RoomActionsView';
|
|
|
|
import RoomInfoView from '../../views/RoomInfoView';
|
2024-01-03 21:14:31 +00:00
|
|
|
import ReportUserView from '../../views/ReportUserView';
|
2020-06-15 14:00:46 +00:00
|
|
|
import RoomInfoEditView from '../../views/RoomInfoEditView';
|
2023-04-10 14:59:00 +00:00
|
|
|
import ChangeAvatarView from '../../views/ChangeAvatarView';
|
2020-06-15 14:00:46 +00:00
|
|
|
import RoomMembersView from '../../views/RoomMembersView';
|
|
|
|
import SearchMessagesView from '../../views/SearchMessagesView';
|
|
|
|
import SelectedUsersView from '../../views/SelectedUsersView';
|
|
|
|
import InviteUsersView from '../../views/InviteUsersView';
|
|
|
|
import InviteUsersEditView from '../../views/InviteUsersEditView';
|
|
|
|
import MessagesView from '../../views/MessagesView';
|
|
|
|
import AutoTranslateView from '../../views/AutoTranslateView';
|
|
|
|
import DirectoryView from '../../views/DirectoryView';
|
|
|
|
import NotificationPrefView from '../../views/NotificationPreferencesView';
|
|
|
|
import ForwardLivechatView from '../../views/ForwardLivechatView';
|
2023-08-04 14:09:36 +00:00
|
|
|
import ForwardMessageView from '../../views/ForwardMessageView';
|
2022-07-15 20:06:27 +00:00
|
|
|
import CloseLivechatView from '../../views/CloseLivechatView';
|
2021-09-22 17:29:26 +00:00
|
|
|
import CannedResponsesListView from '../../views/CannedResponsesListView';
|
|
|
|
import CannedResponseDetail from '../../views/CannedResponseDetail';
|
2020-06-15 14:00:46 +00:00
|
|
|
import LivechatEditView from '../../views/LivechatEditView';
|
|
|
|
import PickerView from '../../views/PickerView';
|
|
|
|
import ThreadMessagesView from '../../views/ThreadMessagesView';
|
2021-04-07 18:31:25 +00:00
|
|
|
import TeamChannelsView from '../../views/TeamChannelsView';
|
2020-06-15 14:00:46 +00:00
|
|
|
import MarkdownTableView from '../../views/MarkdownTableView';
|
|
|
|
import ReadReceiptsView from '../../views/ReadReceiptView';
|
|
|
|
import ProfileView from '../../views/ProfileView';
|
2021-10-06 20:30:10 +00:00
|
|
|
import DisplayPrefsView from '../../views/DisplayPrefsView';
|
2020-06-15 14:00:46 +00:00
|
|
|
import SettingsView from '../../views/SettingsView';
|
|
|
|
import LanguageView from '../../views/LanguageView';
|
|
|
|
import ThemeView from '../../views/ThemeView';
|
|
|
|
import DefaultBrowserView from '../../views/DefaultBrowserView';
|
|
|
|
import ScreenLockConfigView from '../../views/ScreenLockConfigView';
|
|
|
|
import AdminPanelView from '../../views/AdminPanelView';
|
|
|
|
import NewMessageView from '../../views/NewMessageView';
|
|
|
|
import CreateChannelView from '../../views/CreateChannelView';
|
2020-08-21 18:14:06 +00:00
|
|
|
import UserPreferencesView from '../../views/UserPreferencesView';
|
2020-08-21 13:30:11 +00:00
|
|
|
import UserNotificationPrefView from '../../views/UserNotificationPreferencesView';
|
2020-10-30 18:31:04 +00:00
|
|
|
import SecurityPrivacyView from '../../views/SecurityPrivacyView';
|
feat: add media auto-download (#5076)
* feat: media auto-download view
* media auto download view completed and saving the settings in mmkv
* audio download preference
* audio auto download when the user who sent the audio is the same logged on mobile
* creation of isAutoDownloadEnabled, evaluate hist hook, Image Full Size preload done
* minor tweak audio show play button after download
* refactor audioFile to handleMediaDownload and fixed the audio download
* desestructured params to download too
* image download and autoDownload, algo fix the formatAttachmentUrl to show the image from local
* add the possibility to cancel image download and clear local images
* refactor blur component
* video download and auto download, also keeped the behavior to download unsuportted videos to the gallery
* add the possibility to start downloading a video, then exit the room, back again to room and cancel the video previously downloading
* remove the custom hook for autoDownload
* remove blurcomponent, fix the blur style in image.tsx, minor tweak video function name
* send messageId to video
* introducing the reducer to keep the downloads in progress
* create a media download selector
* remove all the redux stuff and do the same as file upload
* video download behavior
* done for image and audio
* fix the try catch download media
* clean up
* image container uiKit
* fix lint
* change rn-fetch-blob to expo-filesystem
* add pt-br
* pass the correct message id when there is an attachment on reply
* refactor some changes requested
* fix audio and move the netInfo from autoDownloadPreference to redux
* variable isAutoDownloadEnable name and handleMediaDownload getExtension
* message/Image refactored, change the component to show the image from FastImage to Image
* refactor handleMediaDownload and deleteMedia
* minor tweak
* refactor audio
* refactor video
* fix the type on the messagesView(the view of files)
* minor tweak
* fix the name of searchMediaFIleAsync's result
* minor tweak, add the default behavior, add the OFF as label
* minor tweaks
* verify if the media auto download exists on settings view
* fix media auto download view layout and minor tweak wifi
* avoid auto download from reply
* minor tweak at comment
* tweak list.section
* change the name to netInfoState and Local_document_directory
* remove mediaType and refactor audio and image
* separate blurview
* thumbnail video and video behavior
* add Audio to i18n and minor tweak
* set the blur as always dark and add the possibility to overlay
* don't need to controle the filepath in the view
* fix the loading in image and video at begin
* save the file with a similar filename as expected
* removed the necessity of messageId or id
* minor tweak
* switch useLayoutEffect to useEffect
* avoid onpress do some edge case because of cached at video
* minor tweak
* tweak at audio comment extension
* minor tweak type userpreferences
* remove test id from mediaAutoDownloadView
* change action's name to SET_NET_INFO_STATE
* caching and deleting video's thumbnails
* remove generate thumbnail
* minor tweak in image
* update camera-roll and save the file from local url
* remove local_cache_directory and deleteThumbnail
* update blur to fix error on android
* fix blur is hiding the file description
* avoid download unsupported video
* return void when it is loading the audio
2023-08-07 14:02:30 +00:00
|
|
|
import MediaAutoDownloadView from '../../views/MediaAutoDownloadView';
|
2020-10-30 18:31:04 +00:00
|
|
|
import E2EEncryptionSecurityView from '../../views/E2EEncryptionSecurityView';
|
2020-06-15 14:00:46 +00:00
|
|
|
// InsideStackNavigator
|
|
|
|
import AttachmentView from '../../views/AttachmentView';
|
|
|
|
import ModalBlockView from '../../views/ModalBlockView';
|
|
|
|
import JitsiMeetView from '../../views/JitsiMeetView';
|
|
|
|
import StatusView from '../../views/StatusView';
|
|
|
|
import CreateDiscussionView from '../../views/CreateDiscussionView';
|
2020-09-11 14:31:38 +00:00
|
|
|
import E2ESaveYourPasswordView from '../../views/E2ESaveYourPasswordView';
|
|
|
|
import E2EHowItWorksView from '../../views/E2EHowItWorksView';
|
|
|
|
import E2EEnterYourPasswordView from '../../views/E2EEnterYourPasswordView';
|
2020-06-26 20:22:56 +00:00
|
|
|
import ShareView from '../../views/ShareView';
|
2020-08-28 19:41:08 +00:00
|
|
|
import QueueListView from '../../ee/omnichannel/views/QueueListView';
|
[NEW] Add/Create/Remove channel on a team (#3090)
* Added Create Team
* Added actionTypes, actions, ENG strings for Teams and updated NewMessageView
* Added createTeam sagas, createTeam reducer, new Team string and update CreateChannelView
* Remove unnecessary actionTypes, reducers and sagas, e2e tests and navigation to team view
* Minor tweaks
* Show TeamChannelsView only if joined the team
* Minor tweak
* Added AddChannelTeamView
* Added permissions, translations strings for teams, deleteTeamRoom and addTeamRooms, AddExistingChannelView, updated CreateChannelView, TeamChannelsView
* Refactor touch component and update removeRoom and deleteRoom methods
* Minor tweaks
* Minor tweaks for removing channels and addExistingChannelView
* Added missing events and fixed channels list
* Minor tweaks for refactored touch component
* Minor tweaks
* Remove unnecesary changes, update TeamChannelsView, AddExistingChannelView, AddChannelTeamView, createChannel, goRoom and Touchable
* Add screens to ModalStack, events, autoJoin, update createChannel, addRoomsToTeam and Touchable
* Minor tweak
* Update loadMessagesForRoom.js
* Updated schema, tag component, touch, AddChannelTeamView, AddExistingChannelView, ActionSheet Item
* Fix unnecessary changes
* Add i18n, update createChannel, AddExistingChannelTeamView, AddChannelTeamView, RightButton and TeamChannelsView
* Updated styles, added tag story
* Minor tweak
* Minor tweaks
* Auto-join tweak
* Minor tweaks
* Minor tweak on search
* One way to refactor :P
* Next level refactor :)
* Fix create group dm
* Refactor renderItem
* Minor bug fixes
* Fix stories
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2021-05-19 21:14:42 +00:00
|
|
|
import AddChannelTeamView from '../../views/AddChannelTeamView';
|
|
|
|
import AddExistingChannelView from '../../views/AddExistingChannelView';
|
[NEW] Leave Teams (#3116)
* Added Create Team
* Added actionTypes, actions, ENG strings for Teams and updated NewMessageView
* Added createTeam sagas, createTeam reducer, new Team string and update CreateChannelView
* Remove unnecessary actionTypes, reducers and sagas, e2e tests and navigation to team view
* Minor tweaks
* Show TeamChannelsView only if joined the team
* Minor tweak
* Added AddChannelTeamView
* Added permissions, translations strings for teams, deleteTeamRoom and addTeamRooms, AddExistingChannelView, updated CreateChannelView, TeamChannelsView
* Refactor touch component and update removeRoom and deleteRoom methods
* Minor tweaks
* Minor tweaks for removing channels and addExistingChannelView
* Added missing events and fixed channels list
* Minor tweaks for refactored touch component
* Added SelectListView and logic for leaving team
* Minor tweak
* Minor tweak
* Minor tweaks
* Remove unnecesary changes, update TeamChannelsView, AddExistingChannelView, AddChannelTeamView, createChannel, goRoom and Touchable
* Remove unnecesary prop
* Add screens to ModalStack, events, autoJoin, update createChannel, addRoomsToTeam and Touchable
* Minor tweak
* Update loadMessagesForRoom.js
* Updated schema, tag component, touch, AddChannelTeamView, AddExistingChannelView, ActionSheet Item
* Fix unnecessary changes
* Add i18n, update createChannel, AddExistingChannelTeamView, AddChannelTeamView, RightButton and TeamChannelsView
* Updated styles, added tag story
* Minor tweak
* Minor tweaks
* Auto-join tweak
* Minor tweaks
* Minor tweak on search
* Minor refactor to ListItem, add SelectListView to ModalStack, update handleLeaveTeam
* Minor tweaks
* Update SelectListView
* Update handleLeaveTeam, remove unnecessary method, add story
* Minor tweak
* Minor visual tweaks
* Updated SelectListView, RoomActionsView, leaveTeam method and string translations
* Update SelectListVIew
* Minor tweak
* Update SelectListView
* Minor tweak
* Fix for List.Item subtitles being pushed down by title's flex
* Minor tweaks
* Update RoomActionsView
* Use showConfirmationAlert and showErrorAlert
* Lint
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2021-05-25 18:04:05 +00:00
|
|
|
import SelectListView from '../../views/SelectListView';
|
2021-09-16 18:16:02 +00:00
|
|
|
import DiscussionsView from '../../views/DiscussionsView';
|
2021-09-13 20:41:05 +00:00
|
|
|
import { ModalContainer } from './ModalContainer';
|
2021-12-03 19:27:57 +00:00
|
|
|
import {
|
|
|
|
MasterDetailChatsStackParamList,
|
|
|
|
MasterDetailDrawerParamList,
|
|
|
|
MasterDetailInsideStackParamList,
|
|
|
|
ModalStackParamList
|
|
|
|
} from './types';
|
2022-12-01 17:20:22 +00:00
|
|
|
import { isIOS } from '../../lib/methods/helpers';
|
2023-06-29 21:10:49 +00:00
|
|
|
import { TNavigation } from '../stackType';
|
2023-10-19 13:38:57 +00:00
|
|
|
import { SupportedVersionsWarning } from '../../containers/SupportedVersions';
|
2020-08-28 19:41:08 +00:00
|
|
|
|
2020-06-15 14:00:46 +00:00
|
|
|
// ChatsStackNavigator
|
2021-12-03 19:27:57 +00:00
|
|
|
const ChatsStack = createStackNavigator<MasterDetailChatsStackParamList>();
|
2020-06-15 14:00:46 +00:00
|
|
|
const ChatsStackNavigator = React.memo(() => {
|
|
|
|
const { theme } = React.useContext(ThemeContext);
|
|
|
|
|
|
|
|
return (
|
2021-12-03 19:27:57 +00:00
|
|
|
<ChatsStack.Navigator
|
2022-08-08 21:02:08 +00:00
|
|
|
screenOptions={{ ...defaultHeader, ...themedHeader(theme), ...StackAnimation } as StackNavigationOptions}
|
|
|
|
>
|
2021-09-13 20:41:05 +00:00
|
|
|
<ChatsStack.Screen name='RoomView' component={RoomView} options={{ headerShown: false }} />
|
2020-06-15 14:00:46 +00:00
|
|
|
</ChatsStack.Navigator>
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
// DrawerNavigator
|
2021-12-03 19:27:57 +00:00
|
|
|
const Drawer = createDrawerNavigator<MasterDetailDrawerParamList>();
|
2020-06-15 14:00:46 +00:00
|
|
|
const DrawerNavigator = React.memo(() => (
|
|
|
|
<Drawer.Navigator
|
2022-06-01 19:46:37 +00:00
|
|
|
screenOptions={{ drawerType: 'permanent', headerShown: false, drawerStyle: { ...drawerStyle } }}
|
2022-08-08 21:02:08 +00:00
|
|
|
drawerContent={({ navigation, state }) => <RoomsListView navigation={navigation} state={state} />}
|
|
|
|
>
|
2020-06-15 14:00:46 +00:00
|
|
|
<Drawer.Screen name='ChatsStackNavigator' component={ChatsStackNavigator} />
|
|
|
|
</Drawer.Navigator>
|
|
|
|
));
|
|
|
|
|
2021-12-03 19:27:57 +00:00
|
|
|
export interface INavigation {
|
|
|
|
navigation: StackNavigationProp<ModalStackParamList>;
|
|
|
|
}
|
|
|
|
|
2023-06-30 14:01:01 +00:00
|
|
|
const ModalStack = createStackNavigator<ModalStackParamList & TNavigation>();
|
2021-12-03 19:27:57 +00:00
|
|
|
const ModalStackNavigator = React.memo(({ navigation }: INavigation) => {
|
2020-06-15 14:00:46 +00:00
|
|
|
const { theme } = React.useContext(ThemeContext);
|
|
|
|
return (
|
|
|
|
<ModalContainer navigation={navigation} theme={theme}>
|
2021-12-03 19:27:57 +00:00
|
|
|
<ModalStack.Navigator
|
2022-08-08 21:02:08 +00:00
|
|
|
screenOptions={{ ...defaultHeader, ...themedHeader(theme), ...StackAnimation } as StackNavigationOptions}
|
|
|
|
>
|
2024-01-25 14:11:41 +00:00
|
|
|
<ModalStack.Screen name='RoomActionsView' component={RoomActionsView} options={RoomActionsView.navigationOptions} />
|
2023-09-26 14:33:53 +00:00
|
|
|
{/* @ts-ignore */}
|
|
|
|
<ModalStack.Screen name='RoomInfoView' component={RoomInfoView} />
|
2024-01-03 21:14:31 +00:00
|
|
|
<ModalStack.Screen name='ReportUserView' component={ReportUserView} />
|
2023-09-26 14:33:53 +00:00
|
|
|
{/* @ts-ignore */}
|
2022-01-17 16:10:39 +00:00
|
|
|
<ModalStack.Screen name='SelectListView' component={SelectListView} />
|
2021-09-13 20:41:05 +00:00
|
|
|
<ModalStack.Screen name='RoomInfoEditView' component={RoomInfoEditView} options={RoomInfoEditView.navigationOptions} />
|
2023-04-10 14:59:00 +00:00
|
|
|
<ModalStack.Screen name='ChangeAvatarView' component={ChangeAvatarView} />
|
2022-08-26 13:21:25 +00:00
|
|
|
<ModalStack.Screen name='RoomMembersView' component={RoomMembersView} />
|
2020-06-15 14:00:46 +00:00
|
|
|
<ModalStack.Screen
|
|
|
|
name='SearchMessagesView'
|
|
|
|
component={SearchMessagesView}
|
|
|
|
options={SearchMessagesView.navigationOptions}
|
|
|
|
/>
|
2021-09-13 20:41:05 +00:00
|
|
|
<ModalStack.Screen name='SelectedUsersView' component={SelectedUsersView} />
|
2022-05-13 13:02:01 +00:00
|
|
|
<ModalStack.Screen name='InviteUsersView' component={InviteUsersView} />
|
2021-12-03 19:27:57 +00:00
|
|
|
<ModalStack.Screen name='AddChannelTeamView' component={AddChannelTeamView} />
|
2023-07-06 17:40:46 +00:00
|
|
|
<ModalStack.Screen name='AddExistingChannelView' component={AddExistingChannelView} />
|
2023-02-02 21:41:32 +00:00
|
|
|
<ModalStack.Screen name='InviteUsersEditView' component={InviteUsersEditView} />
|
2021-09-13 20:41:05 +00:00
|
|
|
<ModalStack.Screen name='MessagesView' component={MessagesView} />
|
2023-06-29 22:01:34 +00:00
|
|
|
<ModalStack.Screen name='AutoTranslateView' component={AutoTranslateView} />
|
2020-06-15 14:00:46 +00:00
|
|
|
<ModalStack.Screen
|
|
|
|
name='DirectoryView'
|
|
|
|
component={DirectoryView}
|
2022-01-17 16:10:39 +00:00
|
|
|
options={props => DirectoryView.navigationOptions!({ ...props, isMasterDetail: true })}
|
2020-06-15 14:00:46 +00:00
|
|
|
/>
|
2022-05-23 17:33:58 +00:00
|
|
|
<ModalStack.Screen name='QueueListView' component={QueueListView} />
|
2022-08-01 16:35:05 +00:00
|
|
|
<ModalStack.Screen name='NotificationPrefView' component={NotificationPrefView} />
|
2023-08-04 14:09:36 +00:00
|
|
|
<ModalStack.Screen name='ForwardMessageView' component={ForwardMessageView} />
|
2023-05-18 21:09:33 +00:00
|
|
|
{/* @ts-ignore */}
|
2022-05-02 12:03:55 +00:00
|
|
|
<ModalStack.Screen name='ForwardLivechatView' component={ForwardLivechatView} />
|
2022-07-15 20:06:27 +00:00
|
|
|
<ModalStack.Screen name='CloseLivechatView' component={CloseLivechatView} />
|
2021-12-03 19:27:57 +00:00
|
|
|
<ModalStack.Screen name='CannedResponsesListView' component={CannedResponsesListView} />
|
|
|
|
<ModalStack.Screen name='CannedResponseDetail' component={CannedResponseDetail} />
|
2021-09-16 18:16:02 +00:00
|
|
|
<ModalStack.Screen name='LivechatEditView' component={LivechatEditView} options={LivechatEditView.navigationOptions} />
|
2023-06-30 14:01:01 +00:00
|
|
|
<ModalStack.Screen name='PickerView' component={PickerView} />
|
2023-05-18 21:09:33 +00:00
|
|
|
{/* @ts-ignore */}
|
2021-09-16 18:16:02 +00:00
|
|
|
<ModalStack.Screen name='ThreadMessagesView' component={ThreadMessagesView} />
|
|
|
|
<ModalStack.Screen name='DiscussionsView' component={DiscussionsView} />
|
|
|
|
<ModalStack.Screen name='TeamChannelsView' component={TeamChannelsView} options={TeamChannelsView.navigationOptions} />
|
2022-05-13 12:57:19 +00:00
|
|
|
<ModalStack.Screen name='MarkdownTableView' component={MarkdownTableView} />
|
2020-06-15 14:00:46 +00:00
|
|
|
<ModalStack.Screen
|
|
|
|
name='ReadReceiptsView'
|
|
|
|
component={ReadReceiptsView}
|
2022-01-17 16:10:39 +00:00
|
|
|
options={props => ReadReceiptsView.navigationOptions!({ ...props, isMasterDetail: true })}
|
2020-06-15 14:00:46 +00:00
|
|
|
/>
|
2022-09-30 14:50:33 +00:00
|
|
|
<ModalStack.Screen name='SettingsView' component={SettingsView} />
|
2022-09-22 21:40:32 +00:00
|
|
|
<ModalStack.Screen name='LanguageView' component={LanguageView} />
|
2022-05-05 15:24:36 +00:00
|
|
|
<ModalStack.Screen name='ThemeView' component={ThemeView} />
|
2022-08-19 13:46:58 +00:00
|
|
|
<ModalStack.Screen name='DefaultBrowserView' component={DefaultBrowserView} />
|
2020-06-15 14:00:46 +00:00
|
|
|
<ModalStack.Screen
|
|
|
|
name='ScreenLockConfigView'
|
|
|
|
component={ScreenLockConfigView}
|
|
|
|
options={ScreenLockConfigView.navigationOptions}
|
|
|
|
/>
|
2021-09-13 20:41:05 +00:00
|
|
|
<ModalStack.Screen name='StatusView' component={StatusView} />
|
2022-06-22 12:24:25 +00:00
|
|
|
<ModalStack.Screen name='ProfileView' component={ProfileView} />
|
2021-10-06 20:30:10 +00:00
|
|
|
<ModalStack.Screen name='DisplayPrefsView' component={DisplayPrefsView} />
|
2022-05-11 16:33:27 +00:00
|
|
|
<ModalStack.Screen name='AdminPanelView' component={AdminPanelView} />
|
2022-08-26 19:16:45 +00:00
|
|
|
<ModalStack.Screen name='NewMessageView' component={NewMessageView} />
|
2021-09-13 20:41:05 +00:00
|
|
|
<ModalStack.Screen name='SelectedUsersViewCreateChannel' component={SelectedUsersView} />
|
2022-08-26 19:16:45 +00:00
|
|
|
<ModalStack.Screen name='CreateChannelView' component={CreateChannelView} />
|
2021-09-13 20:41:05 +00:00
|
|
|
<ModalStack.Screen name='CreateDiscussionView' component={CreateDiscussionView} />
|
2022-08-17 13:51:40 +00:00
|
|
|
<ModalStack.Screen name='E2ESaveYourPasswordView' component={E2ESaveYourPasswordView} />
|
2022-08-11 14:50:03 +00:00
|
|
|
<ModalStack.Screen name='E2EHowItWorksView' component={E2EHowItWorksView} />
|
2022-08-11 14:59:40 +00:00
|
|
|
<ModalStack.Screen name='E2EEnterYourPasswordView' component={E2EEnterYourPasswordView} />
|
2021-12-03 19:27:57 +00:00
|
|
|
<ModalStack.Screen name='UserPreferencesView' component={UserPreferencesView} />
|
2022-09-22 21:31:23 +00:00
|
|
|
<ModalStack.Screen name='UserNotificationPrefView' component={UserNotificationPrefView} />
|
2021-12-03 19:27:57 +00:00
|
|
|
<ModalStack.Screen name='SecurityPrivacyView' component={SecurityPrivacyView} />
|
feat: add media auto-download (#5076)
* feat: media auto-download view
* media auto download view completed and saving the settings in mmkv
* audio download preference
* audio auto download when the user who sent the audio is the same logged on mobile
* creation of isAutoDownloadEnabled, evaluate hist hook, Image Full Size preload done
* minor tweak audio show play button after download
* refactor audioFile to handleMediaDownload and fixed the audio download
* desestructured params to download too
* image download and autoDownload, algo fix the formatAttachmentUrl to show the image from local
* add the possibility to cancel image download and clear local images
* refactor blur component
* video download and auto download, also keeped the behavior to download unsuportted videos to the gallery
* add the possibility to start downloading a video, then exit the room, back again to room and cancel the video previously downloading
* remove the custom hook for autoDownload
* remove blurcomponent, fix the blur style in image.tsx, minor tweak video function name
* send messageId to video
* introducing the reducer to keep the downloads in progress
* create a media download selector
* remove all the redux stuff and do the same as file upload
* video download behavior
* done for image and audio
* fix the try catch download media
* clean up
* image container uiKit
* fix lint
* change rn-fetch-blob to expo-filesystem
* add pt-br
* pass the correct message id when there is an attachment on reply
* refactor some changes requested
* fix audio and move the netInfo from autoDownloadPreference to redux
* variable isAutoDownloadEnable name and handleMediaDownload getExtension
* message/Image refactored, change the component to show the image from FastImage to Image
* refactor handleMediaDownload and deleteMedia
* minor tweak
* refactor audio
* refactor video
* fix the type on the messagesView(the view of files)
* minor tweak
* fix the name of searchMediaFIleAsync's result
* minor tweak, add the default behavior, add the OFF as label
* minor tweaks
* verify if the media auto download exists on settings view
* fix media auto download view layout and minor tweak wifi
* avoid auto download from reply
* minor tweak at comment
* tweak list.section
* change the name to netInfoState and Local_document_directory
* remove mediaType and refactor audio and image
* separate blurview
* thumbnail video and video behavior
* add Audio to i18n and minor tweak
* set the blur as always dark and add the possibility to overlay
* don't need to controle the filepath in the view
* fix the loading in image and video at begin
* save the file with a similar filename as expected
* removed the necessity of messageId or id
* minor tweak
* switch useLayoutEffect to useEffect
* avoid onpress do some edge case because of cached at video
* minor tweak
* tweak at audio comment extension
* minor tweak type userpreferences
* remove test id from mediaAutoDownloadView
* change action's name to SET_NET_INFO_STATE
* caching and deleting video's thumbnails
* remove generate thumbnail
* minor tweak in image
* update camera-roll and save the file from local url
* remove local_cache_directory and deleteThumbnail
* update blur to fix error on android
* fix blur is hiding the file description
* avoid download unsupported video
* return void when it is loading the audio
2023-08-07 14:02:30 +00:00
|
|
|
<ModalStack.Screen name='MediaAutoDownloadView' component={MediaAutoDownloadView} />
|
2023-07-05 19:33:47 +00:00
|
|
|
<ModalStack.Screen name='E2EEncryptionSecurityView' component={E2EEncryptionSecurityView} />
|
2023-10-19 13:38:57 +00:00
|
|
|
<ModalStack.Screen name='SupportedVersionsWarning' component={SupportedVersionsWarning} />
|
2020-06-15 14:00:46 +00:00
|
|
|
</ModalStack.Navigator>
|
|
|
|
</ModalContainer>
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
// InsideStackNavigator
|
2023-06-29 21:10:49 +00:00
|
|
|
const InsideStack = createStackNavigator<MasterDetailInsideStackParamList & TNavigation>();
|
2020-06-15 14:00:46 +00:00
|
|
|
const InsideStackNavigator = React.memo(() => {
|
|
|
|
const { theme } = React.useContext(ThemeContext);
|
|
|
|
return (
|
2021-12-03 19:27:57 +00:00
|
|
|
<InsideStack.Navigator
|
2022-06-01 19:46:37 +00:00
|
|
|
screenOptions={
|
|
|
|
{
|
|
|
|
...defaultHeader,
|
|
|
|
...themedHeader(theme),
|
|
|
|
...FadeFromCenterModal,
|
|
|
|
presentation: 'transparentModal'
|
|
|
|
} as StackNavigationOptions
|
2022-08-08 21:02:08 +00:00
|
|
|
}
|
|
|
|
>
|
2021-09-13 20:41:05 +00:00
|
|
|
<InsideStack.Screen name='DrawerNavigator' component={DrawerNavigator} options={{ headerShown: false }} />
|
|
|
|
<InsideStack.Screen name='ModalStackNavigator' component={ModalStackNavigator} options={{ headerShown: false }} />
|
|
|
|
<InsideStack.Screen name='AttachmentView' component={AttachmentView} />
|
|
|
|
<InsideStack.Screen name='ModalBlockView' component={ModalBlockView} options={ModalBlockView.navigationOptions} />
|
2022-12-01 17:20:22 +00:00
|
|
|
<InsideStack.Screen
|
|
|
|
name='JitsiMeetView'
|
|
|
|
component={JitsiMeetView}
|
|
|
|
options={{ headerShown: false, animationEnabled: isIOS }}
|
|
|
|
/>
|
2021-09-13 20:41:05 +00:00
|
|
|
<InsideStack.Screen name='ShareView' component={ShareView} />
|
2020-06-15 14:00:46 +00:00
|
|
|
</InsideStack.Navigator>
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
2020-06-16 20:32:30 +00:00
|
|
|
export default InsideStackNavigator;
|