2019-08-27 12:25:38 +00:00
|
|
|
import { StyleSheet } from 'react-native';
|
2018-01-09 17:12:55 +00:00
|
|
|
|
2019-03-29 19:36:07 +00:00
|
|
|
import sharedStyles from '../../views/Styles';
|
2024-01-22 21:53:01 +00:00
|
|
|
import { isTablet } from '../../lib/methods/helpers';
|
2019-04-08 12:35:28 +00:00
|
|
|
|
2022-03-21 20:44:06 +00:00
|
|
|
export default StyleSheet.create({
|
2018-11-16 11:06:29 +00:00
|
|
|
root: {
|
|
|
|
flexDirection: 'row'
|
|
|
|
},
|
2018-09-11 16:32:52 +00:00
|
|
|
container: {
|
2019-03-27 20:06:57 +00:00
|
|
|
paddingVertical: 4,
|
2019-02-27 14:47:15 +00:00
|
|
|
width: '100%',
|
2019-03-27 20:06:57 +00:00
|
|
|
paddingHorizontal: 14,
|
2019-05-20 20:43:50 +00:00
|
|
|
flexDirection: 'column'
|
2018-09-11 16:32:52 +00:00
|
|
|
},
|
2020-09-11 14:31:38 +00:00
|
|
|
contentContainer: {
|
|
|
|
flex: 1
|
|
|
|
},
|
2018-04-24 19:34:03 +00:00
|
|
|
messageContent: {
|
|
|
|
flex: 1,
|
2019-03-01 16:49:11 +00:00
|
|
|
marginLeft: 46
|
2018-09-11 16:32:52 +00:00
|
|
|
},
|
2018-11-16 11:06:29 +00:00
|
|
|
messageContentWithHeader: {
|
2019-03-01 16:49:11 +00:00
|
|
|
marginLeft: 10
|
2018-01-09 17:12:55 +00:00
|
|
|
},
|
2018-11-16 11:06:29 +00:00
|
|
|
messageContentWithError: {
|
|
|
|
marginLeft: 0
|
|
|
|
},
|
2018-02-08 14:08:50 +00:00
|
|
|
flex: {
|
2019-05-20 20:43:50 +00:00
|
|
|
flexDirection: 'row'
|
2018-02-08 14:08:50 +00:00
|
|
|
},
|
2018-04-24 19:34:03 +00:00
|
|
|
temp: { opacity: 0.3 },
|
2019-03-27 20:06:57 +00:00
|
|
|
marginTop: {
|
2019-03-29 19:36:07 +00:00
|
|
|
marginTop: 6
|
2018-11-16 11:06:29 +00:00
|
|
|
},
|
2018-01-30 19:48:26 +00:00
|
|
|
reactionsContainer: {
|
|
|
|
flexDirection: 'row',
|
2018-04-24 19:34:03 +00:00
|
|
|
flexWrap: 'wrap',
|
2020-10-30 17:35:07 +00:00
|
|
|
marginTop: 8
|
2018-01-30 19:48:26 +00:00
|
|
|
},
|
2018-09-19 14:18:32 +00:00
|
|
|
reactionButton: {
|
2020-10-30 17:35:07 +00:00
|
|
|
marginRight: 8,
|
|
|
|
marginBottom: 8,
|
2022-11-10 16:22:02 +00:00
|
|
|
borderRadius: 4
|
2018-09-19 14:18:32 +00:00
|
|
|
},
|
2018-01-30 19:48:26 +00:00
|
|
|
reactionContainer: {
|
|
|
|
flexDirection: 'row',
|
|
|
|
justifyContent: 'center',
|
|
|
|
alignItems: 'center',
|
2022-11-10 16:22:02 +00:00
|
|
|
borderRadius: 4,
|
2019-03-29 19:36:07 +00:00
|
|
|
borderWidth: 1,
|
2018-09-11 16:32:52 +00:00
|
|
|
height: 28,
|
2019-03-29 19:36:07 +00:00
|
|
|
minWidth: 46.3
|
2018-09-19 14:18:32 +00:00
|
|
|
},
|
2018-01-30 19:48:26 +00:00
|
|
|
reactionCount: {
|
2018-07-18 20:34:59 +00:00
|
|
|
fontSize: 14,
|
|
|
|
marginLeft: 3,
|
2018-09-11 16:32:52 +00:00
|
|
|
marginRight: 8.5,
|
2019-03-29 19:36:07 +00:00
|
|
|
...sharedStyles.textSemibold
|
2018-01-30 19:48:26 +00:00
|
|
|
},
|
|
|
|
reactionEmoji: {
|
2018-09-11 16:32:52 +00:00
|
|
|
fontSize: 13,
|
2020-03-17 20:42:02 +00:00
|
|
|
marginLeft: 7,
|
|
|
|
color: '#ffffff'
|
2018-01-30 19:48:26 +00:00
|
|
|
},
|
|
|
|
reactionCustomEmoji: {
|
2018-09-11 16:32:52 +00:00
|
|
|
width: 19,
|
|
|
|
height: 19,
|
|
|
|
marginLeft: 7
|
2018-02-08 14:08:50 +00:00
|
|
|
},
|
|
|
|
avatar: {
|
2019-03-27 20:06:57 +00:00
|
|
|
marginTop: 4
|
2018-04-24 19:34:03 +00:00
|
|
|
},
|
2019-05-03 13:33:38 +00:00
|
|
|
avatarSmall: {
|
|
|
|
marginLeft: 16
|
|
|
|
},
|
2019-04-08 12:35:28 +00:00
|
|
|
buttonContainer: {
|
2020-10-30 17:35:07 +00:00
|
|
|
marginTop: 8,
|
2019-04-08 12:35:28 +00:00
|
|
|
flexDirection: 'row',
|
|
|
|
alignItems: 'center'
|
|
|
|
},
|
|
|
|
button: {
|
2020-10-30 17:35:07 +00:00
|
|
|
paddingHorizontal: 12,
|
|
|
|
paddingVertical: 8,
|
2018-09-11 16:32:52 +00:00
|
|
|
flexDirection: 'row',
|
2018-05-24 20:17:45 +00:00
|
|
|
alignItems: 'center',
|
|
|
|
justifyContent: 'center',
|
2022-11-10 16:22:02 +00:00
|
|
|
borderRadius: 4
|
2018-09-11 16:32:52 +00:00
|
|
|
},
|
2019-04-08 12:35:28 +00:00
|
|
|
buttonIcon: {
|
2020-10-30 17:35:07 +00:00
|
|
|
marginRight: 8
|
2018-05-24 20:17:45 +00:00
|
|
|
},
|
2019-04-08 12:35:28 +00:00
|
|
|
buttonText: {
|
2020-10-30 17:35:07 +00:00
|
|
|
fontSize: 12,
|
|
|
|
...sharedStyles.textSemibold
|
2018-05-29 17:09:20 +00:00
|
|
|
},
|
2018-08-01 19:35:06 +00:00
|
|
|
imageContainer: {
|
2019-03-01 16:49:11 +00:00
|
|
|
flexDirection: 'column',
|
|
|
|
borderRadius: 4
|
2018-08-01 19:35:06 +00:00
|
|
|
},
|
|
|
|
image: {
|
|
|
|
width: '100%',
|
2019-11-25 20:01:17 +00:00
|
|
|
minHeight: isTablet ? 300 : 200,
|
2018-09-11 16:32:52 +00:00
|
|
|
borderRadius: 4,
|
2020-06-26 20:22:56 +00:00
|
|
|
borderWidth: 1,
|
|
|
|
overflow: 'hidden'
|
2018-08-01 19:35:06 +00:00
|
|
|
},
|
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
|
|
|
imageBlurContainer: {
|
|
|
|
height: '100%'
|
|
|
|
},
|
2019-05-20 20:43:50 +00:00
|
|
|
imagePressed: {
|
|
|
|
opacity: 0.5
|
|
|
|
},
|
2018-08-01 19:35:06 +00:00
|
|
|
inlineImage: {
|
|
|
|
width: 300,
|
|
|
|
height: 300,
|
|
|
|
resizeMode: 'contain'
|
2018-09-11 16:32:52 +00:00
|
|
|
},
|
2019-08-27 12:25:38 +00:00
|
|
|
text: {
|
|
|
|
fontSize: 16,
|
2019-03-29 19:36:07 +00:00
|
|
|
...sharedStyles.textRegular
|
2019-04-08 12:35:28 +00:00
|
|
|
},
|
2019-08-27 12:25:38 +00:00
|
|
|
textInfo: {
|
|
|
|
fontSize: 16,
|
2019-04-08 12:35:28 +00:00
|
|
|
...sharedStyles.textRegular
|
|
|
|
},
|
2019-04-17 17:01:03 +00:00
|
|
|
startedDiscussion: {
|
|
|
|
fontStyle: 'italic',
|
|
|
|
fontSize: 16,
|
|
|
|
marginBottom: 6,
|
|
|
|
...sharedStyles.textRegular
|
|
|
|
},
|
2019-04-08 12:35:28 +00:00
|
|
|
time: {
|
2022-05-20 17:56:07 +00:00
|
|
|
fontSize: 13,
|
2020-11-30 21:47:05 +00:00
|
|
|
marginLeft: 8,
|
2020-10-30 17:35:07 +00:00
|
|
|
...sharedStyles.textRegular
|
2019-04-17 17:01:03 +00:00
|
|
|
},
|
|
|
|
repliedThread: {
|
2019-04-24 18:36:29 +00:00
|
|
|
flexDirection: 'row',
|
2019-05-03 13:33:38 +00:00
|
|
|
alignItems: 'center',
|
|
|
|
marginTop: 6,
|
|
|
|
marginBottom: 12
|
2019-04-24 18:36:29 +00:00
|
|
|
},
|
|
|
|
repliedThreadIcon: {
|
2019-05-03 13:33:38 +00:00
|
|
|
marginRight: 10,
|
|
|
|
marginLeft: 16
|
2019-04-17 17:01:03 +00:00
|
|
|
},
|
|
|
|
repliedThreadName: {
|
2019-05-03 13:33:38 +00:00
|
|
|
fontSize: 16,
|
2019-04-24 18:36:29 +00:00
|
|
|
flex: 1,
|
2019-04-25 17:18:49 +00:00
|
|
|
...sharedStyles.textRegular
|
2019-06-10 18:36:31 +00:00
|
|
|
},
|
2020-10-30 13:59:44 +00:00
|
|
|
repliedThreadDisclosure: {
|
|
|
|
marginLeft: 4,
|
|
|
|
marginRight: 4,
|
|
|
|
alignItems: 'center',
|
|
|
|
justifyContent: 'center'
|
|
|
|
},
|
2020-10-30 17:35:07 +00:00
|
|
|
threadBadge: {
|
|
|
|
width: 8,
|
|
|
|
height: 8,
|
|
|
|
borderRadius: 4,
|
|
|
|
marginLeft: 8
|
|
|
|
},
|
|
|
|
threadBell: {
|
|
|
|
marginLeft: 8
|
|
|
|
},
|
2022-05-27 17:27:43 +00:00
|
|
|
rightIcons: {
|
|
|
|
paddingLeft: 5
|
2020-09-11 14:31:38 +00:00
|
|
|
},
|
2021-01-14 17:06:19 +00:00
|
|
|
threadDetails: {
|
|
|
|
flex: 1,
|
|
|
|
marginLeft: 12
|
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
|
|
|
},
|
|
|
|
blurView: {
|
|
|
|
position: 'absolute',
|
|
|
|
borderWidth: 0,
|
|
|
|
top: 0,
|
|
|
|
left: 0,
|
|
|
|
bottom: 0,
|
|
|
|
right: 0
|
|
|
|
},
|
|
|
|
blurIndicator: {
|
|
|
|
position: 'absolute',
|
|
|
|
justifyContent: 'center',
|
|
|
|
alignItems: 'center'
|
2018-01-09 17:12:55 +00:00
|
|
|
}
|
|
|
|
});
|