Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
56793d2
Stash
djorkaeffalexandre Dec 17, 2019
0a2c4ec
Add pods
djorkaeffalexandre Dec 17, 2019
140373a
Loading
djorkaeffalexandre Dec 17, 2019
14b8b03
Remove File Modal
djorkaeffalexandre Dec 17, 2019
283f78b
Merge develop
djorkaeffalexandre Dec 17, 2019
44e70c4
Improve UX
djorkaeffalexandre Dec 17, 2019
048af47
Fix save
djorkaeffalexandre Dec 17, 2019
1ce0702
Fix shared id
djorkaeffalexandre Dec 17, 2019
c9499a0
Encode uri
djorkaeffalexandre Dec 17, 2019
7b0d512
Use animated fast image
djorkaeffalexandre Dec 17, 2019
905d8d2
Fixes
djorkaeffalexandre Dec 17, 2019
1916996
Pod install
djorkaeffalexandre Dec 17, 2019
82fd2a6
Fix android permission
djorkaeffalexandre Dec 17, 2019
b677590
Merge branch 'develop' of https://github.com/RocketChat/Rocket.Chat.R…
djorkaeffalexandre Dec 18, 2019
b2ef18f
Fixes
djorkaeffalexandre Dec 18, 2019
5c557b6
Fix formatAttachmentUrl
djorkaeffalexandre Dec 18, 2019
1c8ec34
I18n
djorkaeffalexandre Dec 18, 2019
e101698
Save to Album Rocket.Chat & Tablet AttachmentView
djorkaeffalexandre Dec 18, 2019
afea195
Fix load video
djorkaeffalexandre Dec 18, 2019
a9d1fd0
Add image progress
djorkaeffalexandre Dec 18, 2019
60d37c9
Files on tablet
djorkaeffalexandre Dec 18, 2019
2121f89
Use Progress.Pie on Image
diegolmello Dec 18, 2019
7443921
Hash downloaded file
diegolmello Dec 18, 2019
89b8cc5
Use image extension from server
djorkaeffalexandre Dec 18, 2019
265d991
Remove console
djorkaeffalexandre Dec 18, 2019
41fb0aa
Remove unused props
djorkaeffalexandre Dec 18, 2019
57c1656
Merge branch 'develop' into new.image-viewer
diegolmello Dec 18, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 92 additions & 52 deletions __tests__/__snapshots__/Storyshots.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10718,39 +10718,59 @@ exports[`Storyshots Message list 1`] = `
style={
Array [
Object {
"overflow": "hidden",
"borderRadius": 4,
"borderWidth": 1,
"minHeight": 200,
"width": "100%",
},
Object {
"borderColor": "#e1e5e8",
},
]
}
>
<View
style={
Array [
Object {
"borderRadius": 4,
"borderWidth": 1,
"minHeight": 200,
"width": "100%",
"overflow": "hidden",
},
Array [
Object {
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
},
undefined,
],
]
}
>
<FastImageView
onFastImageError={[Function]}
onFastImageLoad={[Function]}
onFastImageLoadEnd={[Function]}
onFastImageLoadStart={[Function]}
onFastImageProgress={[Function]}
resizeMode="cover"
source={
Object {
"borderColor": "#e1e5e8",
},
],
]
}
>
<FastImageView
resizeMode="cover"
source={
Object {
"uri": "https://open.rocket.chat/file-upload/2ZrxuwcGeTrsoh376/Clipboard%252520-%252520September%2525205,%2525202018%2525204:10%252520PM?rc_uid=y8bd77ptZswPj3EW8&rc_token=79q6lH40W4ZRGLOshDiDiVlQaCc4f_lU9HNdHLAzuHz",
"uri": "https://open.rocket.chat/file-upload/2ZrxuwcGeTrsoh376/Clipboard%252520-%252520September%2525205,%2525202018%2525204:10%252520PM?rc_uid=y8bd77ptZswPj3EW8&rc_token=79q6lH40W4ZRGLOshDiDiVlQaCc4f_lU9HNdHLAzuHz",
}
}
}
style={
Object {
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
style={
Object {
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
}
}
}
/>
/>
</View>
</View>
<Text
style={
Expand Down Expand Up @@ -10995,39 +11015,59 @@ exports[`Storyshots Message list 1`] = `
style={
Array [
Object {
"overflow": "hidden",
"borderRadius": 4,
"borderWidth": 1,
"minHeight": 200,
"width": "100%",
},
Object {
"borderColor": "#e1e5e8",
},
]
}
>
<View
style={
Array [
Object {
"borderRadius": 4,
"borderWidth": 1,
"minHeight": 200,
"width": "100%",
"overflow": "hidden",
},
Array [
Object {
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
},
undefined,
],
]
}
>
<FastImageView
onFastImageError={[Function]}
onFastImageLoad={[Function]}
onFastImageLoadEnd={[Function]}
onFastImageLoadStart={[Function]}
onFastImageProgress={[Function]}
resizeMode="cover"
source={
Object {
"borderColor": "#e1e5e8",
},
],
]
}
>
<FastImageView
resizeMode="cover"
source={
Object {
"uri": "https://open.rocket.chat/file-upload/sxLXBzjwuqxMnebyP/Clipboard%252520-%25252029%252520de%252520Agosto%252520de%2525202018%252520%2525C3%2525A0s%25252018:10?rc_uid=y8bd77ptZswPj3EW8&rc_token=79q6lH40W4ZRGLOshDiDiVlQaCc4f_lU9HNdHLAzuHz",
"uri": "https://open.rocket.chat/file-upload/sxLXBzjwuqxMnebyP/Clipboard%252520-%25252029%252520de%252520Agosto%252520de%2525202018%252520%2525C3%2525A0s%25252018:10?rc_uid=y8bd77ptZswPj3EW8&rc_token=79q6lH40W4ZRGLOshDiDiVlQaCc4f_lU9HNdHLAzuHz",
}
}
}
style={
Object {
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
style={
Object {
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
}
}
}
/>
/>
</View>
</View>
<Text
style={
Expand Down
132 changes: 0 additions & 132 deletions app/containers/FileModal.js

This file was deleted.

10 changes: 10 additions & 0 deletions app/containers/HeaderButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ export const MoreButton = React.memo(({ onPress, testID }) => (
</CustomHeaderButtons>
));

export const SaveButton = React.memo(({ onPress, testID }) => (
<CustomHeaderButtons>
<Item title='save' iconName='Download' onPress={onPress} testID={testID} />
</CustomHeaderButtons>
));

export const LegalButton = React.memo(({ navigation, testID }) => (
<MoreButton onPress={() => navigation.navigate('LegalView')} testID={testID} />
));
Expand All @@ -80,6 +86,10 @@ MoreButton.propTypes = {
onPress: PropTypes.func.isRequired,
testID: PropTypes.string.isRequired
};
SaveButton.propTypes = {
onPress: PropTypes.func.isRequired,
testID: PropTypes.string.isRequired
};
LegalButton.propTypes = {
navigation: PropTypes.object.isRequired,
testID: PropTypes.string.isRequired
Expand Down
8 changes: 4 additions & 4 deletions app/containers/message/Attachments.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ import Video from './Video';
import Reply from './Reply';

const Attachments = React.memo(({
attachments, timeFormat, user, baseUrl, useMarkdown, onOpenFileModal, getCustomEmoji, theme
attachments, timeFormat, user, baseUrl, useMarkdown, showAttachment, getCustomEmoji, theme
}) => {
if (!attachments || attachments.length === 0) {
return null;
}

return attachments.map((file, index) => {
if (file.image_url) {
return <Image key={file.image_url} file={file} user={user} baseUrl={baseUrl} onOpenFileModal={onOpenFileModal} getCustomEmoji={getCustomEmoji} useMarkdown={useMarkdown} theme={theme} />;
return <Image key={file.image_url} file={file} user={user} baseUrl={baseUrl} showAttachment={showAttachment} getCustomEmoji={getCustomEmoji} useMarkdown={useMarkdown} theme={theme} />;
}
if (file.audio_url) {
return <Audio key={file.audio_url} file={file} user={user} baseUrl={baseUrl} getCustomEmoji={getCustomEmoji} useMarkdown={useMarkdown} theme={theme} />;
}
if (file.video_url) {
return <Video key={file.video_url} file={file} user={user} baseUrl={baseUrl} onOpenFileModal={onOpenFileModal} getCustomEmoji={getCustomEmoji} useMarkdown={useMarkdown} theme={theme} />;
return <Video key={file.video_url} file={file} user={user} baseUrl={baseUrl} showAttachment={showAttachment} getCustomEmoji={getCustomEmoji} useMarkdown={useMarkdown} theme={theme} />;
}

// eslint-disable-next-line react/no-array-index-key
Expand All @@ -36,7 +36,7 @@ Attachments.propTypes = {
user: PropTypes.object,
baseUrl: PropTypes.string,
useMarkdown: PropTypes.bool,
onOpenFileModal: PropTypes.func,
showAttachment: PropTypes.func,
getCustomEmoji: PropTypes.func,
theme: PropTypes.string
};
Expand Down
Loading