From 2d4bfa51f821e5e41aaed6aba5a6fa09aa00a12c Mon Sep 17 00:00:00 2001 From: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com> Date: Thu, 10 Jun 2021 14:06:03 -0300 Subject: [PATCH 1/4] [FIX] Wrong system messages being passed as parameters to room save (#3197) --- app/utils/messageTypes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/utils/messageTypes.js b/app/utils/messageTypes.js index f874a437a..eacd2c514 100644 --- a/app/utils/messageTypes.js +++ b/app/utils/messageTypes.js @@ -27,10 +27,10 @@ export const MessageTypeValues = [ value: 'rm', text: 'Message_HideType_rm' }, { - value: 'subscription_role_added', + value: 'subscription-role-added', text: 'Message_HideType_subscription_role_added' }, { - value: 'subscription_role_removed', + value: 'subscription-role-removed', text: 'Message_HideType_subscription_role_removed' }, { value: 'room_archived', From 86ca76194dc1fdc77e99a29713c8ee1fb17d2539 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Thu, 10 Jun 2021 14:11:05 -0300 Subject: [PATCH 2/4] [FIX] RoomItem's long press crashing the app if prop is missing (#3199) * Check onLongPress prop * Add Touch stories --- .../__snapshots__/Storyshots.test.js.snap | 398 ++++++++++++++++++ app/presentation/RoomItem/index.js | 4 +- storybook/stories/RoomItem.js | 3 + 3 files changed, 404 insertions(+), 1 deletion(-) diff --git a/__tests__/__snapshots__/Storyshots.test.js.snap b/__tests__/__snapshots__/Storyshots.test.js.snap index 52fa5d01d..3e3106d94 100644 --- a/__tests__/__snapshots__/Storyshots.test.js.snap +++ b/__tests__/__snapshots__/Storyshots.test.js.snap @@ -59100,6 +59100,404 @@ exports[`Storyshots Room Item Tag 1`] = ` `; +exports[`Storyshots Room Item Touch 1`] = ` + + + + + + + + +  + + + Read + + + + + + + +  + + + Favorite + + + + +  + + + Hide + + + + + + + + + + + + + +  + + + rocket.cat + + + + + + + + + +`; + exports[`Storyshots Room Item Type 1`] = ` { const { item, onLongPress } = this.props; - return onLongPress(item); + if (onLongPress) { + return onLongPress(item); + } } render() { diff --git a/storybook/stories/RoomItem.js b/storybook/stories/RoomItem.js index 025fbf7f5..c13eaa4d2 100644 --- a/storybook/stories/RoomItem.js +++ b/storybook/stories/RoomItem.js @@ -44,6 +44,9 @@ stories.add('Basic', () => ( )); +stories.add('Touch', () => ( + alert('on press')} onLongPress={() => alert('on long press')} /> +)); stories.add('User', () => ( <> From 303c26f71669c8f7e0e7e723716f4e4a0fe71cfe Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Thu, 10 Jun 2021 14:32:35 -0300 Subject: [PATCH 3/4] [FIX] Crashing on link press (#3204) --- app/containers/markdown/Link.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/containers/markdown/Link.js b/app/containers/markdown/Link.js index 054b3d4d9..008dc0ba8 100644 --- a/app/containers/markdown/Link.js +++ b/app/containers/markdown/Link.js @@ -12,7 +12,7 @@ const Link = React.memo(({ children, link, theme, onLinkPress }) => { const handlePress = () => { - if (!link) { + if (!link || !onLinkPress) { return; } onLinkPress(link); From 3177bc3e58cd30d6a3b9c33905eb01fc069ba29c Mon Sep 17 00:00:00 2001 From: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com> Date: Thu, 10 Jun 2021 14:52:00 -0300 Subject: [PATCH 4/4] [FIX] Don't show Block Button inside Group DM Actions (#3195) * [FIX] Don't show Block Button inside Group DM Actions * Use RocketChat.isGroupChat instead of simple if condition * Add return Co-authored-by: Diego Mello --- app/views/RoomActionsView/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/RoomActionsView/index.js b/app/views/RoomActionsView/index.js index e5c630ebb..d16ea5768 100644 --- a/app/views/RoomActionsView/index.js +++ b/app/views/RoomActionsView/index.js @@ -714,7 +714,7 @@ class RoomActionsView extends React.Component { return null; } - if (t === 'd') { + if (t === 'd' && !RocketChat.isGroupChat(room)) { return ( @@ -751,6 +751,8 @@ class RoomActionsView extends React.Component { ); } + + return null; } teamChannelActions = (t, room) => {