From 057ca8afacff4063464c9232d45cb31f24d2e835 Mon Sep 17 00:00:00 2001
From: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com>
Date: Wed, 30 Nov 2022 15:35:17 -0300
Subject: [PATCH 1/7] Regression: The Unordered and Ordered List text color to
bodyText (#4717)
* Regression: The Unordered and Ordered List text color to bodyText
* update storyshot
---
.../markdown/new/__snapshots__/NewMarkdown.stories.storyshot | 2 +-
app/containers/markdown/new/OrderedList.tsx | 4 +++-
app/containers/markdown/new/UnorderedList.tsx | 4 +++-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/__tests__/containers/markdown/new/__snapshots__/NewMarkdown.stories.storyshot b/__tests__/containers/markdown/new/__snapshots__/NewMarkdown.stories.storyshot
index 778da6777..e56a41ce3 100644
--- a/__tests__/containers/markdown/new/__snapshots__/NewMarkdown.stories.storyshot
+++ b/__tests__/containers/markdown/new/__snapshots__/NewMarkdown.stories.storyshot
@@ -16,7 +16,7 @@ exports[`Storyshots NewMarkdown Katex 1`] = `"{\\"type\\":\\"View\\",\\"props\\"
exports[`Storyshots NewMarkdown Links 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"marginHorizontal\\":15,\\"backgroundColor\\":\\"#ffffff\\",\\"marginVertical\\":50}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#2f343d\\"}]},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"flexShrink\\":1}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#1d74f5\\"}]},\\"children\\":[\\"https://rocket.chat\\"]}]}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#2f343d\\"}]},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"flexShrink\\":1}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#1d74f5\\"}]},\\"children\\":[\\"Markdown link\\"]}]}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#2f343d\\"}]},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"flexShrink\\":1}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#1d74f5\\"}]},\\"children\\":[\\"Normal Link - \\",{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"700\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\"Bold\\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\"Bold\\"]}]},\\" \\",{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"textDecorationLine\\":\\"line-through\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\"strike\\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\"strike\\"]}]},\\" and \\",{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"fontStyle\\":\\"italic\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\"Italic\\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\"Italic\\"]}]},\\" Styles\\"]}]}]}]}"`;
-exports[`Storyshots NewMarkdown Lists 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"marginHorizontal\\":15,\\"backgroundColor\\":\\"#ffffff\\",\\"marginVertical\\":50}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#2f343d\\"}]},\\"children\\":[\\"- \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"flexShrink\\":1}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\"Plain text \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\"Plain text \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"color\\":\\"#2f343d\\"},{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"}]},\\"children\\":[\\"💡\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"fontStyle\\":\\"italic\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\" italic \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\" italic \\"]}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"700\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\" bold \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\" bold \\"]}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"textDecorationLine\\":\\"line-through\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\" strike \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\" strike \\"]}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#F3BE08\\"}]},\\"children\\":[\\"#general\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#1d74f5\\"}]},\\"children\\":[\\" link \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#F5455C\\"}]},\\"children\\":[\\"rocket.cat\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Courier New\\",\\"fontWeight\\":\\"400\\",\\"borderWidth\\":1,\\"borderRadius\\":4,\\"paddingLeft\\":2,\\"paddingTop\\":2},{\\"color\\":\\"#2f343d\\",\\"backgroundColor\\":\\"#f1f2f4\\",\\"borderColor\\":\\"#e1e5e8\\"}]},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{},\\"children\\":[\\" inline code\\"]}]}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#2f343d\\"}]},\\"children\\":[\\"- \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"flexShrink\\":1}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries\\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries\\"]}]}]}]},{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#2f343d\\"}]},\\"children\\":[\\". \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"flexShrink\\":1}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\"Plain text \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\"Plain text \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"color\\":\\"#2f343d\\"},{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"}]},\\"children\\":[\\"💡\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"fontStyle\\":\\"italic\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\" italic \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\" italic \\"]}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"700\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\" bold \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\" bold \\"]}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"textDecorationLine\\":\\"line-through\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\" strike \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\" strike \\"]}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#F3BE08\\"}]},\\"children\\":[\\"#general\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#1d74f5\\"}]},\\"children\\":[\\" link \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#F5455C\\"}]},\\"children\\":[\\"rocket.cat\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Courier New\\",\\"fontWeight\\":\\"400\\",\\"borderWidth\\":1,\\"borderRadius\\":4,\\"paddingLeft\\":2,\\"paddingTop\\":2},{\\"color\\":\\"#2f343d\\",\\"backgroundColor\\":\\"#f1f2f4\\",\\"borderColor\\":\\"#e1e5e8\\"}]},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{},\\"children\\":[\\" inline code\\"]}]}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#2f343d\\"}]},\\"children\\":[\\". \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"flexShrink\\":1}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries\\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries\\"]}]}]}]},{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#2f343d\\"}]},\\"children\\":[\\"- [x] \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"flexShrink\\":1}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\"Plain text \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\"Plain text \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"color\\":\\"#2f343d\\"},{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"}]},\\"children\\":[\\"💡\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"fontStyle\\":\\"italic\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\" italic \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\" italic \\"]}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"700\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\" bold \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\" bold \\"]}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"textDecorationLine\\":\\"line-through\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\" strike \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\" strike \\"]}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#F3BE08\\"}]},\\"children\\":[\\"#general\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#1d74f5\\"}]},\\"children\\":[\\" link \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#F5455C\\"}]},\\"children\\":[\\"rocket.cat\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Courier New\\",\\"fontWeight\\":\\"400\\",\\"borderWidth\\":1,\\"borderRadius\\":4,\\"paddingLeft\\":2,\\"paddingTop\\":2},{\\"color\\":\\"#2f343d\\",\\"backgroundColor\\":\\"#f1f2f4\\",\\"borderColor\\":\\"#e1e5e8\\"}]},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{},\\"children\\":[\\" inline code\\"]}]}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#2f343d\\"}]},\\"children\\":[\\"- [ ] \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"flexShrink\\":1}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries\\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries\\"]}]}]}]}]}"`;
+exports[`Storyshots NewMarkdown Lists 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"marginHorizontal\\":15,\\"backgroundColor\\":\\"#ffffff\\",\\"marginVertical\\":50}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#2f343d\\"}]},\\"children\\":[\\"- \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"color\\":\\"#2f343d\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"flexShrink\\":1}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\"Plain text \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\"Plain text \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"color\\":\\"#2f343d\\"},{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"}]},\\"children\\":[\\"💡\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"fontStyle\\":\\"italic\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\" italic \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\" italic \\"]}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"700\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\" bold \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\" bold \\"]}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"textDecorationLine\\":\\"line-through\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\" strike \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\" strike \\"]}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#F3BE08\\"}]},\\"children\\":[\\"#general\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#1d74f5\\"}]},\\"children\\":[\\" link \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#F5455C\\"}]},\\"children\\":[\\"rocket.cat\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Courier New\\",\\"fontWeight\\":\\"400\\",\\"borderWidth\\":1,\\"borderRadius\\":4,\\"paddingLeft\\":2,\\"paddingTop\\":2},{\\"color\\":\\"#2f343d\\",\\"backgroundColor\\":\\"#f1f2f4\\",\\"borderColor\\":\\"#e1e5e8\\"}]},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{},\\"children\\":[\\" inline code\\"]}]}]}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#2f343d\\"}]},\\"children\\":[\\"- \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"color\\":\\"#2f343d\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"flexShrink\\":1}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries\\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries\\"]}]}]}]}]},{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#2f343d\\"}]},\\"children\\":[\\". \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"color\\":\\"#2f343d\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"flexShrink\\":1}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\"Plain text \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\"Plain text \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"color\\":\\"#2f343d\\"},{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"}]},\\"children\\":[\\"💡\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"fontStyle\\":\\"italic\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\" italic \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\" italic \\"]}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"700\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\" bold \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\" bold \\"]}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"textDecorationLine\\":\\"line-through\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\" strike \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\" strike \\"]}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#F3BE08\\"}]},\\"children\\":[\\"#general\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#1d74f5\\"}]},\\"children\\":[\\" link \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#F5455C\\"}]},\\"children\\":[\\"rocket.cat\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Courier New\\",\\"fontWeight\\":\\"400\\",\\"borderWidth\\":1,\\"borderRadius\\":4,\\"paddingLeft\\":2,\\"paddingTop\\":2},{\\"color\\":\\"#2f343d\\",\\"backgroundColor\\":\\"#f1f2f4\\",\\"borderColor\\":\\"#e1e5e8\\"}]},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{},\\"children\\":[\\" inline code\\"]}]}]}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#2f343d\\"}]},\\"children\\":[\\". \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"color\\":\\"#2f343d\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"flexShrink\\":1}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries\\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries\\"]}]}]}]}]},{\\"type\\":\\"View\\",\\"props\\":{},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#2f343d\\"}]},\\"children\\":[\\"- [x] \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"flexShrink\\":1}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\"Plain text \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\"Plain text \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"color\\":\\"#2f343d\\"},{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"}]},\\"children\\":[\\"💡\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"fontStyle\\":\\"italic\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\" italic \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\" italic \\"]}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"700\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\" bold \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\" bold \\"]}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"textDecorationLine\\":\\"line-through\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\" strike \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\" strike \\"]}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#F3BE08\\"}]},\\"children\\":[\\"#general\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#1d74f5\\"}]},\\"children\\":[\\" link \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#F5455C\\"}]},\\"children\\":[\\"rocket.cat\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Courier New\\",\\"fontWeight\\":\\"400\\",\\"borderWidth\\":1,\\"borderRadius\\":4,\\"paddingLeft\\":2,\\"paddingTop\\":2},{\\"color\\":\\"#2f343d\\",\\"backgroundColor\\":\\"#f1f2f4\\",\\"borderColor\\":\\"#e1e5e8\\"}]},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{},\\"children\\":[\\" inline code\\"]}]}]}]},{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"flexDirection\\":\\"row\\"}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#2f343d\\"}]},\\"children\\":[\\"- [ ] \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"flexShrink\\":1}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries\\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries\\"]}]}]}]}]}"`;
exports[`Storyshots NewMarkdown Mentions 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"marginHorizontal\\":15,\\"backgroundColor\\":\\"#ffffff\\",\\"marginVertical\\":50}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#2f343d\\"}]},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"flexShrink\\":1}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#F5455C\\"}]},\\"children\\":[\\"rocket.cat\\"]}]}]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#2f343d\\"}]},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":{\\"flexShrink\\":1}},\\"children\\":[{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#F3BE08\\"}]},\\"children\\":[\\"name\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\" \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\" \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#F5455C\\"}]},\\"children\\":[\\"rocket.cat\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\" \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\" \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\"},{\\"color\\":\\"#2f343d\\"}]},\\"children\\":[\\"@not_a_user\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\" \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\" \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#F38C39\\"}]},\\"children\\":[\\"here\\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"accessibilityLabel\\":\\" \\",\\"style\\":{\\"fontSize\\":16,\\"flexShrink\\":1}},\\"children\\":[\\" \\"]},{\\"type\\":\\"Text\\",\\"props\\":{\\"style\\":[{\\"fontSize\\":16,\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"600\\"},{\\"color\\":\\"#F38C39\\"}]},\\"children\\":[\\"all\\"]}]}]}]}"`;
diff --git a/app/containers/markdown/new/OrderedList.tsx b/app/containers/markdown/new/OrderedList.tsx
index 02965c214..3371128de 100644
--- a/app/containers/markdown/new/OrderedList.tsx
+++ b/app/containers/markdown/new/OrderedList.tsx
@@ -17,7 +17,9 @@ const OrderedList = ({ value }: IOrderedListProps): React.ReactElement => {
{value.map(item => (
{item.number}.
-
+
+
+
))}
diff --git a/app/containers/markdown/new/UnorderedList.tsx b/app/containers/markdown/new/UnorderedList.tsx
index 8df46edf7..9e383f47e 100644
--- a/app/containers/markdown/new/UnorderedList.tsx
+++ b/app/containers/markdown/new/UnorderedList.tsx
@@ -18,7 +18,9 @@ const UnorderedList = ({ value }: IUnorderedListProps) => {
{value.map(item => (
-
-
+
+
+
))}
From a8b3a3b7de966c5a00fad0f6d30a6bc4a20f22fe Mon Sep 17 00:00:00 2001
From: Gleidson Daniel Silva
Date: Thu, 1 Dec 2022 14:20:22 -0300
Subject: [PATCH 2/7] [IMPROVE] Disable Jitsi native module on Android (#4708)
* temp: disable jitsi on android
* update props and subscription
* add open intent
* add request permissions
* disable react-native-jitsi-meet on android and separate implementations
* fix ios
* fix import alias
* revert android manifest indentation
* add catch to method
* return comment
* remove is iOS
* fix queries
* remove unused data
* webview audio
* fix android permissions
* fix audio android
* change how to open jitsi app
* remove loading
* update close logic
---
.eslintrc.js | 2 +-
android/app/build.gradle | 3 -
android/app/src/main/AndroidManifest.xml | 14 ++-
android/build.gradle | 5 -
app/lib/methods/videoConf.ts | 18 +++-
app/stacks/InsideStack.tsx | 7 +-
app/stacks/MasterDetailStack/index.tsx | 7 +-
app/views/JitsiMeetView.android.tsx | 102 ++++++++++++++++++
app/views/JitsiMeetView.d.ts | 5 +
...itsiMeetView.tsx => JitsiMeetView.ios.tsx} | 55 ++++------
package.json | 1 +
react-native.config.js | 5 +
yarn.lock | 5 +
13 files changed, 176 insertions(+), 53 deletions(-)
create mode 100644 app/views/JitsiMeetView.android.tsx
create mode 100644 app/views/JitsiMeetView.d.ts
rename app/views/{JitsiMeetView.tsx => JitsiMeetView.ios.tsx} (78%)
diff --git a/.eslintrc.js b/.eslintrc.js
index 1f0105d18..963e50abf 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -2,7 +2,7 @@ module.exports = {
settings: {
'import/resolver': {
node: {
- extensions: ['.ts', '.tsx', '.js', '.ios.js', '.android.js', '.native.js']
+ extensions: ['.ts', '.tsx', '.js', '.ios.js', '.android.js', '.native.js', '.ios.tsx', '.android.tsx']
}
}
},
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 493b9874d..fe11088a0 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -357,9 +357,6 @@ dependencies {
playImplementation project(':@react-native-firebase_app')
playImplementation project(':@react-native-firebase_analytics')
playImplementation project(':@react-native-firebase_crashlytics')
- implementation(project(':react-native-jitsi-meet')) { // https://github.com/skrafft/react-native-jitsi-meet#side-note
- exclude group: 'com.facebook.react',module:'react-native-svg'
- }
implementation fileTree(dir: "libs", include: ["*.jar"])
//noinspection GradleDynamicVersion
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 9c72e6b32..0765164fb 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -5,6 +5,12 @@
+
+
+
+
+
+
-
+
+
+
+
+
+
diff --git a/android/build.gradle b/android/build.gradle
index 8680080c2..b05e6a6f1 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -26,8 +26,6 @@ buildscript {
kotlinVersion = '1.6.10'
supportLibVersion = "28.0.0"
libre_build = !(isPlay.toBoolean())
- jitsi_url = "https://github.com/RocketChat/jitsi-maven-repository/raw/master/releases"
- jitsi_version = "3.7.0"
}
repositories {
@@ -68,9 +66,6 @@ allprojects {
url "$rootDir/../node_modules/detox/Detox-android"
}
- maven {
- url jitsi_url
- }
mavenCentral {
content {
excludeGroup "com.facebook.react"
diff --git a/app/lib/methods/videoConf.ts b/app/lib/methods/videoConf.ts
index f10b2ad14..13c604164 100644
--- a/app/lib/methods/videoConf.ts
+++ b/app/lib/methods/videoConf.ts
@@ -1,14 +1,22 @@
-import navigation from '../navigation/appNavigation';
-import openLink from './helpers/openLink';
-import { Services } from '../services';
-import log from './helpers/log';
-import { showErrorAlert } from './helpers';
+import { PermissionsAndroid } from 'react-native';
+
import i18n from '../../i18n';
+import navigation from '../navigation/appNavigation';
+import { Services } from '../services';
+import { isAndroid, showErrorAlert } from './helpers';
+import log from './helpers/log';
+import openLink from './helpers/openLink';
export const videoConfJoin = async (callId: string, cam: boolean) => {
try {
const result = await Services.videoConferenceJoin(callId, cam);
if (result.success) {
+ if (isAndroid) {
+ await PermissionsAndroid.requestMultiple([
+ PermissionsAndroid.PERMISSIONS.CAMERA,
+ PermissionsAndroid.PERMISSIONS.RECORD_AUDIO
+ ]);
+ }
const { url, providerName } = result;
if (providerName === 'jitsi') {
navigation.navigate('JitsiMeetView', { url, onlyAudio: !cam, videoConf: true });
diff --git a/app/stacks/InsideStack.tsx b/app/stacks/InsideStack.tsx
index 0b6475640..9d9899393 100644
--- a/app/stacks/InsideStack.tsx
+++ b/app/stacks/InsideStack.tsx
@@ -80,6 +80,7 @@ import {
ProfileStackParamList,
SettingsStackParamList
} from './types';
+import { isIOS } from '../lib/methods/helpers';
// ChatsStackNavigator
const ChatsStack = createStackNavigator();
@@ -135,7 +136,11 @@ const ChatsStackNavigator = () => {
-
+
);
};
diff --git a/app/stacks/MasterDetailStack/index.tsx b/app/stacks/MasterDetailStack/index.tsx
index 695efc3b9..0b315a284 100644
--- a/app/stacks/MasterDetailStack/index.tsx
+++ b/app/stacks/MasterDetailStack/index.tsx
@@ -73,6 +73,7 @@ import {
MasterDetailInsideStackParamList,
ModalStackParamList
} from './types';
+import { isIOS } from '../../lib/methods/helpers';
// ChatsStackNavigator
const ChatsStack = createStackNavigator();
@@ -222,7 +223,11 @@ const InsideStackNavigator = React.memo(() => {
-
+
);
diff --git a/app/views/JitsiMeetView.android.tsx b/app/views/JitsiMeetView.android.tsx
new file mode 100644
index 000000000..344a656af
--- /dev/null
+++ b/app/views/JitsiMeetView.android.tsx
@@ -0,0 +1,102 @@
+import React from 'react';
+import { BackHandler, NativeEventSubscription } from 'react-native';
+import BackgroundTimer from 'react-native-background-timer';
+import { isAppInstalled, openAppWithUri } from 'react-native-send-intent';
+import WebView from 'react-native-webview';
+import { WebViewMessage, WebViewNavigation } from 'react-native-webview/lib/WebViewTypes';
+
+import { IBaseScreen } from '../definitions';
+import { events, logEvent } from '../lib/methods/helpers/log';
+import { Services } from '../lib/services';
+import { ChatsStackParamList } from '../stacks/types';
+import { withTheme } from '../theme';
+
+const JITSI_INTENT = 'org.jitsi.meet';
+
+type TJitsiMeetViewProps = IBaseScreen;
+
+class JitsiMeetView extends React.Component {
+ private rid: string;
+ private url: string;
+ private videoConf: boolean;
+ private jitsiTimeout: number | null;
+ private backHandler!: NativeEventSubscription;
+
+ constructor(props: TJitsiMeetViewProps) {
+ super(props);
+ this.rid = props.route.params?.rid;
+ this.url = props.route.params?.url;
+ this.videoConf = !!props.route.params?.videoConf;
+ this.jitsiTimeout = null;
+ }
+
+ componentDidMount() {
+ const { route, navigation } = this.props;
+ isAppInstalled(JITSI_INTENT)
+ .then(function (isInstalled) {
+ if (isInstalled) {
+ const callUrl = route.params.url.replace(/^https?:\/\//, '').split('#')[0];
+ openAppWithUri(`intent://${callUrl}#Intent;scheme=${JITSI_INTENT};package=${JITSI_INTENT};end`)
+ .then(() => navigation.pop())
+ .catch(() => {});
+ }
+ })
+ .catch(() => {});
+ this.onConferenceJoined();
+ this.backHandler = BackHandler.addEventListener('hardwareBackPress', () => true);
+ }
+
+ componentWillUnmount() {
+ logEvent(this.videoConf ? events.LIVECHAT_VIDEOCONF_TERMINATE : events.JM_CONFERENCE_TERMINATE);
+ if (this.jitsiTimeout && !this.videoConf) {
+ BackgroundTimer.clearInterval(this.jitsiTimeout);
+ this.jitsiTimeout = null;
+ BackgroundTimer.stopBackgroundTimer();
+ }
+ this.backHandler.remove();
+ }
+
+ // Jitsi Update Timeout needs to be called every 10 seconds to make sure
+ // call is not ended and is available to web users.
+ onConferenceJoined = () => {
+ logEvent(this.videoConf ? events.LIVECHAT_VIDEOCONF_JOIN : events.JM_CONFERENCE_JOIN);
+ if (this.rid && !this.videoConf) {
+ Services.updateJitsiTimeout(this.rid).catch((e: unknown) => console.log(e));
+ if (this.jitsiTimeout) {
+ BackgroundTimer.clearInterval(this.jitsiTimeout);
+ BackgroundTimer.stopBackgroundTimer();
+ this.jitsiTimeout = null;
+ }
+ this.jitsiTimeout = BackgroundTimer.setInterval(() => {
+ Services.updateJitsiTimeout(this.rid).catch((e: unknown) => console.log(e));
+ }, 10000);
+ }
+ };
+
+ onNavigationStateChange = (webViewState: WebViewNavigation | WebViewMessage) => {
+ const { navigation, route } = this.props;
+ const jitsiRoomId = route.params.url
+ ?.split(/^https?:\/\//)[1]
+ ?.split('#')[0]
+ ?.split('/')[1];
+ if ((jitsiRoomId && !webViewState.url.includes(jitsiRoomId)) || webViewState.url.includes('close')) {
+ navigation.pop();
+ }
+ };
+
+ render() {
+ return (
+ this.onNavigationStateChange(nativeEvent)}
+ onNavigationStateChange={this.onNavigationStateChange}
+ style={{ flex: 1 }}
+ javaScriptEnabled
+ domStorageEnabled
+ mediaPlaybackRequiresUserAction={false}
+ />
+ );
+ }
+}
+
+export default withTheme(JitsiMeetView);
diff --git a/app/views/JitsiMeetView.d.ts b/app/views/JitsiMeetView.d.ts
new file mode 100644
index 000000000..c1ad42e90
--- /dev/null
+++ b/app/views/JitsiMeetView.d.ts
@@ -0,0 +1,5 @@
+import React from 'react';
+
+declare const JitsiMeetView: React.SFC<>;
+
+export default JitsiMeetView;
diff --git a/app/views/JitsiMeetView.tsx b/app/views/JitsiMeetView.ios.tsx
similarity index 78%
rename from app/views/JitsiMeetView.tsx
rename to app/views/JitsiMeetView.ios.tsx
index a4af6b835..60cf7198a 100644
--- a/app/views/JitsiMeetView.tsx
+++ b/app/views/JitsiMeetView.ios.tsx
@@ -1,17 +1,16 @@
import React from 'react';
-import { BackHandler, StyleSheet } from 'react-native';
-import JitsiMeet, { JitsiMeetView as RNJitsiMeetView } from 'react-native-jitsi-meet';
+import { StyleSheet } from 'react-native';
import BackgroundTimer from 'react-native-background-timer';
+import JitsiMeet, { JitsiMeetView as RNJitsiMeetView } from 'react-native-jitsi-meet';
import { connect } from 'react-redux';
-import { getUserSelector } from '../selectors/login';
-import ActivityIndicator from '../containers/ActivityIndicator';
+import RCActivityIndicator from '../containers/ActivityIndicator';
+import { IApplicationState, IBaseScreen, IUser } from '../definitions';
import { events, logEvent } from '../lib/methods/helpers/log';
-import { isAndroid, isIOS } from '../lib/methods/helpers';
-import { withTheme } from '../theme';
-import { ChatsStackParamList } from '../stacks/types';
-import { IApplicationState, IUser, IBaseScreen } from '../definitions';
import { Services } from '../lib/services';
+import { getUserSelector } from '../selectors/login';
+import { ChatsStackParamList } from '../stacks/types';
+import { withTheme } from '../theme';
const formatUrl = (url: string, baseUrl: string, uriSize: number, avatarAuthURLFragment: string) =>
`${baseUrl}/avatar/${url}?format=png&width=${uriSize}&height=${uriSize}${avatarAuthURLFragment}`;
@@ -60,20 +59,14 @@ class JitsiMeetView extends React.Component {
+ const onlyAudio = route.params?.onlyAudio ?? false;
+ if (onlyAudio) {
+ JitsiMeet.audioCall(this.url, userInfo);
+ } else {
+ JitsiMeet.call(this.url, userInfo);
+ }
this.setState({ loading: false });
}, 1000);
-
- if (isIOS) {
- setTimeout(() => {
- const onlyAudio = route.params?.onlyAudio ?? false;
- if (onlyAudio) {
- JitsiMeet.audioCall(this.url, userInfo);
- } else {
- JitsiMeet.call(this.url, userInfo);
- }
- }, 1000);
- }
- BackHandler.addEventListener('hardwareBackPress', () => null);
}
componentWillUnmount() {
@@ -83,16 +76,8 @@ class JitsiMeetView extends React.Component null);
- if (isIOS) {
- JitsiMeet.endCall();
- }
- }
-
- endCall = () => {
JitsiMeet.endCall();
- return null;
- };
+ }
onConferenceWillJoin = () => {
this.setState({ loading: false });
@@ -117,8 +102,8 @@ class JitsiMeetView extends React.Component {
- logEvent(this.videoConf ? events.LIVECHAT_VIDEOCONF_TERMINATE : events.JM_CONFERENCE_TERMINATE);
const { navigation } = this.props;
+ logEvent(this.videoConf ? events.LIVECHAT_VIDEOCONF_TERMINATE : events.JM_CONFERENCE_TERMINATE);
// fix to go back when the call ends
setTimeout(() => {
JitsiMeet.endCall();
@@ -127,10 +112,8 @@ class JitsiMeetView extends React.Component
- {loading ? : null}
+ {loading ? : null}
>
);
}
diff --git a/package.json b/package.json
index c2c2dc2ef..04b433fc5 100644
--- a/package.json
+++ b/package.json
@@ -118,6 +118,7 @@
"react-native-safe-area-context": "3.2.0",
"react-native-screens": "3.13.1",
"react-native-scrollable-tab-view": "ptomasroos/react-native-scrollable-tab-view",
+ "react-native-send-intent": "^1.3.0",
"react-native-simple-crypto": "RocketChat/react-native-simple-crypto#0.5.1",
"react-native-skeleton-placeholder": "^5.2.3",
"react-native-slowlog": "^1.0.2",
diff --git a/react-native.config.js b/react-native.config.js
index 9e78b41ad..1dbd95952 100644
--- a/react-native.config.js
+++ b/react-native.config.js
@@ -14,6 +14,11 @@ module.exports = {
platforms: {
android: null
}
+ },
+ 'react-native-jitsi-meet': {
+ platforms: {
+ android: null
+ }
}
}
};
diff --git a/yarn.lock b/yarn.lock
index 124d75a28..bc9ac843c 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -17330,6 +17330,11 @@ react-native-scrollable-tab-view@ptomasroos/react-native-scrollable-tab-view:
prop-types "^15.6.0"
react-timer-mixin "^0.13.3"
+react-native-send-intent@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/react-native-send-intent/-/react-native-send-intent-1.3.0.tgz#d8c7898827da1b8b10e25a645ce6802d1a0b440c"
+ integrity sha512-ODTX7BHITFxdcAL0K2iHfa3qVYnqG8GPcv1NbLBNC1DyCaOSJiiGtVH6Kc5YBqzQ8+1pV9uN5nfQ5wyFgiq74g==
+
react-native-simple-crypto@RocketChat/react-native-simple-crypto#0.5.1:
version "0.5.1"
resolved "https://codeload.github.com/RocketChat/react-native-simple-crypto/tar.gz/dcf6eef5359c739d521371918e13a73f2ea6cb42"
From 87a3f85feb26a2df58a83181971a81947225637c Mon Sep 17 00:00:00 2001
From: Diego Mello
Date: Fri, 2 Dec 2022 11:09:24 -0300
Subject: [PATCH 3/7] Bump version to 4.34.0 (#4724)
---
android/app/build.gradle | 2 +-
ios/RocketChatRN.xcodeproj/project.pbxproj | 4 ++--
ios/RocketChatRN/Info.plist | 2 +-
ios/ShareRocketChatRN/Info.plist | 2 +-
package.json | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/android/app/build.gradle b/android/app/build.gradle
index fe11088a0..44aa3e8de 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -147,7 +147,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode VERSIONCODE as Integer
- versionName "4.33.0"
+ versionName "4.34.0"
vectorDrawables.useSupportLibrary = true
if (!isFoss) {
manifestPlaceholders = [BugsnagAPIKey: BugsnagAPIKey as String]
diff --git a/ios/RocketChatRN.xcodeproj/project.pbxproj b/ios/RocketChatRN.xcodeproj/project.pbxproj
index 1ea9c760d..2d771287c 100644
--- a/ios/RocketChatRN.xcodeproj/project.pbxproj
+++ b/ios/RocketChatRN.xcodeproj/project.pbxproj
@@ -1767,7 +1767,7 @@
INFOPLIST_FILE = NotificationService/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
- MARKETING_VERSION = 4.33.0;
+ MARKETING_VERSION = 4.34.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
@@ -1806,7 +1806,7 @@
INFOPLIST_FILE = NotificationService/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
- MARKETING_VERSION = 4.33.0;
+ MARKETING_VERSION = 4.34.0;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = chat.rocket.reactnative.NotificationService;
diff --git a/ios/RocketChatRN/Info.plist b/ios/RocketChatRN/Info.plist
index 53af2cee5..7b60bee49 100644
--- a/ios/RocketChatRN/Info.plist
+++ b/ios/RocketChatRN/Info.plist
@@ -26,7 +26,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 4.33.0
+ 4.34.0
CFBundleSignature
????
CFBundleURLTypes
diff --git a/ios/ShareRocketChatRN/Info.plist b/ios/ShareRocketChatRN/Info.plist
index 27a4c4b3a..703c7ef91 100644
--- a/ios/ShareRocketChatRN/Info.plist
+++ b/ios/ShareRocketChatRN/Info.plist
@@ -26,7 +26,7 @@
CFBundlePackageType
XPC!
CFBundleShortVersionString
- 4.33.0
+ 4.34.0
CFBundleVersion
1
KeychainGroup
diff --git a/package.json b/package.json
index 04b433fc5..4f4b40066 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "rocket-chat-reactnative",
- "version": "4.33.0",
+ "version": "4.34.0",
"private": true,
"scripts": {
"start": "react-native start",
From cbd9b27cf7085416aa3884827fb648d961af60f5 Mon Sep 17 00:00:00 2001
From: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com>
Date: Fri, 2 Dec 2022 14:06:14 -0300
Subject: [PATCH 4/7] [FIX] Cannot read property 'fetch' of undefined on
ThreadMessagesView (#4557)
* [FIX] Cannot read property 'fetch' of undefined on ThreadMessagesView
* added e2e test
* change from _raw to _id
* test thread messages view with a thread created
---
app/views/ThreadMessagesView/index.tsx | 4 ++--
.../assorted/09-joinfromdirectory.spec.ts | 22 +++++++++++++++++++
2 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/app/views/ThreadMessagesView/index.tsx b/app/views/ThreadMessagesView/index.tsx
index 2aee455b8..2769b3302 100644
--- a/app/views/ThreadMessagesView/index.tsx
+++ b/app/views/ThreadMessagesView/index.tsx
@@ -142,7 +142,7 @@ class ThreadMessagesView extends React.Component (
-
+
)
};
@@ -242,7 +242,7 @@ class ThreadMessagesView extends React.Component ({ messages: [...messages, ...update] }));
return;
}
diff --git a/e2e/tests/assorted/09-joinfromdirectory.spec.ts b/e2e/tests/assorted/09-joinfromdirectory.spec.ts
index ab181b9ed..c9e19efb2 100644
--- a/e2e/tests/assorted/09-joinfromdirectory.spec.ts
+++ b/e2e/tests/assorted/09-joinfromdirectory.spec.ts
@@ -1,5 +1,6 @@
import data from '../../data';
import { navigateToLogin, login, tapBack, sleep } from '../../helpers/app';
+import { sendMessage } from '../../helpers/data_setup';
const testuser = data.users.regular;
@@ -26,6 +27,13 @@ describe('Join room from directory', () => {
});
describe('Usage', () => {
+ const threadMessage = `thread-${data.random}`;
+ before(async () => {
+ const result = await sendMessage(data.users.alternate, data.channels.detoxpublic.name, threadMessage);
+ const threadId = result.message._id;
+ await sendMessage(data.users.alternate, result.message.rid, data.random, threadId);
+ });
+
it('should tap directory', async () => {
await element(by.id('rooms-list-view-directory')).tap();
await waitFor(element(by.id('directory-view')))
@@ -37,6 +45,20 @@ describe('Join room from directory', () => {
await navigateToRoom(data.channels.detoxpublic.name);
});
+ it('should navigate to thread messages view and load messages', async () => {
+ await waitFor(element(by.id('room-view-header-threads')))
+ .toBeVisible()
+ .withTimeout(2000);
+ await element(by.id('room-view-header-threads')).tap();
+ await waitFor(element(by.id(`thread-messages-view-${threadMessage}`)))
+ .toBeVisible()
+ .withTimeout(2000);
+ await tapBack();
+ await waitFor(element(by.id('room-view-header-threads')))
+ .toBeVisible()
+ .withTimeout(2000);
+ });
+
it('should search user and navigate', async () => {
await tapBack();
await element(by.id('rooms-list-view-directory')).tap();
From 00661174a3e71b863e084b98d5dd1320dcdcec5c Mon Sep 17 00:00:00 2001
From: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com>
Date: Mon, 5 Dec 2022 12:19:57 -0300
Subject: [PATCH 5/7] [FIX] Bottom View color when using iPad (#4643)
* [FIX] Bottom View color when using iPAD
* [FIX] Bottom View color when using iPAD
* tweak on path to react-native-ui-lib in package.json
---
yarn.lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/yarn.lock b/yarn.lock
index bc9ac843c..4f3e5d74e 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -17379,7 +17379,7 @@ react-native-text-size@4.0.0-rc.1:
react-native-ui-lib@RocketChat/react-native-ui-lib:
version "4.2.0"
- resolved "https://codeload.github.com/RocketChat/react-native-ui-lib/tar.gz/d20c1bcd09b694fc5133fc2232fd510f5f4ba581"
+ resolved "https://codeload.github.com/RocketChat/react-native-ui-lib/tar.gz/fd5869e493b5b9cf888cec4a252c9ef292364b02"
dependencies:
babel-plugin-transform-inline-environment-variables "^0.0.2"
color "^3.1.0"
From a2722f07b06bbdf3c6cd9fd1cc8f441781c76f4d Mon Sep 17 00:00:00 2001
From: Gleidson Daniel Silva
Date: Mon, 5 Dec 2022 13:31:44 -0300
Subject: [PATCH 6/7] [FIX] Can't upload the same file on two rooms at the same
time (#4528)
* update style to match other spaces
* fix sending the same file in different rooms and add the limit for sending the same file
* remove when error happens and cant finish the upload
* use the same variable as rocket.chat
* minor tweak upload path and removed _raw
* change from 2 to 4
Co-authored-by: Reinaldo Neto
Co-authored-by: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com>
---
app/i18n/locales/en.json | 2 ++
app/i18n/locales/pt-BR.json | 2 ++
app/lib/methods/sendFileMessage.ts | 43 +++++++++++++++++----------
app/views/RoomView/UploadProgress.tsx | 8 +++--
4 files changed, 36 insertions(+), 19 deletions(-)
diff --git a/app/i18n/locales/en.json b/app/i18n/locales/en.json
index e62df8189..3fe3ea01b 100644
--- a/app/i18n/locales/en.json
+++ b/app/i18n/locales/en.json
@@ -565,6 +565,8 @@
"Unsupported_system_message": "Unsupported system message",
"Updating": "Updating...",
"Uploading": "Uploading",
+ "FileUpload_Error": "File Upload Error",
+ "Upload_in_progress": "Upload in progress",
"Upload_file_question_mark": "Upload file?",
"User": "User",
"Users": "Users",
diff --git a/app/i18n/locales/pt-BR.json b/app/i18n/locales/pt-BR.json
index 3bb4de322..014d785a1 100644
--- a/app/i18n/locales/pt-BR.json
+++ b/app/i18n/locales/pt-BR.json
@@ -513,6 +513,8 @@
"Unsupported_system_message": "Mensagem de sistema não suportada",
"Updating": "Atualizando...",
"Uploading": "Subindo arquivo",
+ "FileUpload_Error": "Erro de upload de arquivo",
+ "Upload_in_progress": "Carregamento em andamento",
"Upload_file_question_mark": "Enviar arquivo?",
"User": "Usuário",
"Users": "Usuários",
diff --git a/app/lib/methods/sendFileMessage.ts b/app/lib/methods/sendFileMessage.ts
index c8facc473..dbbe6317e 100644
--- a/app/lib/methods/sendFileMessage.ts
+++ b/app/lib/methods/sendFileMessage.ts
@@ -1,27 +1,35 @@
import { sanitizedRaw } from '@nozbe/watermelondb/RawRecord';
import { settings as RocketChatSettings } from '@rocket.chat/sdk';
-import { FetchBlobResponse, StatefulPromise } from 'rn-fetch-blob';
import isEmpty from 'lodash/isEmpty';
+import { FetchBlobResponse, StatefulPromise } from 'rn-fetch-blob';
+import { Alert } from 'react-native';
-import FileUpload from './helpers/fileUpload';
-import database from '../database';
-import log from './helpers/log';
import { IUpload, IUser, TUploadModel } from '../../definitions';
+import i18n from '../../i18n';
+import database from '../database';
+import FileUpload from './helpers/fileUpload';
import { IFileUpload } from './helpers/fileUpload/interfaces';
+import log from './helpers/log';
const uploadQueue: { [index: string]: StatefulPromise } = {};
-export function isUploadActive(path: string): boolean {
- return !!uploadQueue[path];
+const getUploadPath = (path: string, rid: string) => `${path}-${rid}`;
+
+export function isUploadActive(path: string, rid: string): boolean {
+ return !!uploadQueue[getUploadPath(path, rid)];
}
-export async function cancelUpload(item: TUploadModel): Promise {
- if (!isEmpty(uploadQueue[item.path])) {
+export async function cancelUpload(item: TUploadModel, rid: string): Promise {
+ const uploadPath = getUploadPath(item.path, rid);
+ if (!isEmpty(uploadQueue[uploadPath])) {
try {
- await uploadQueue[item.path].cancel();
+ await uploadQueue[uploadPath].cancel();
} catch {
// Do nothing
}
+ delete uploadQueue[uploadPath];
+ }
+ if (item.id) {
try {
const db = database.active;
await db.write(async () => {
@@ -30,7 +38,6 @@ export async function cancelUpload(item: TUploadModel): Promise {
} catch (e) {
log(e);
}
- delete uploadQueue[item.path];
}
}
@@ -51,14 +58,18 @@ export function sendFileMessage(
const db = database.active;
const uploadsCollection = db.get('uploads');
+ const uploadPath = getUploadPath(fileInfo.path, rid);
let uploadRecord: TUploadModel;
try {
- uploadRecord = await uploadsCollection.find(fileInfo.path);
+ uploadRecord = await uploadsCollection.find(uploadPath);
+ if (uploadRecord.id) {
+ return Alert.alert(i18n.t('FileUpload_Error'), i18n.t('Upload_in_progress'));
+ }
} catch (error) {
try {
await db.write(async () => {
uploadRecord = await uploadsCollection.create(u => {
- u._raw = sanitizedRaw({ id: fileInfo.path }, uploadsCollection.schema);
+ u._raw = sanitizedRaw({ id: uploadPath }, uploadsCollection.schema);
Object.assign(u, fileInfo);
if (u.subscription) {
u.subscription.id = rid;
@@ -99,9 +110,9 @@ export function sendFileMessage(
'X-User-Id': id
};
- uploadQueue[fileInfo.path] = FileUpload.fetch('POST', uploadUrl, headers, formData);
+ uploadQueue[uploadPath] = FileUpload.fetch('POST', uploadUrl, headers, formData);
- uploadQueue[fileInfo.path].uploadProgress(async (loaded: number, total: number) => {
+ uploadQueue[uploadPath].uploadProgress(async (loaded: number, total: number) => {
try {
await db.write(async () => {
await uploadRecord.update(u => {
@@ -113,7 +124,7 @@ export function sendFileMessage(
}
});
- uploadQueue[fileInfo.path].then(async response => {
+ uploadQueue[uploadPath].then(async response => {
if (response.respInfo.status >= 200 && response.respInfo.status < 400) {
// If response is all good...
try {
@@ -142,7 +153,7 @@ export function sendFileMessage(
}
});
- uploadQueue[fileInfo.path].catch(async error => {
+ uploadQueue[uploadPath].catch(async error => {
try {
await db.write(async () => {
await uploadRecord.update(u => {
diff --git a/app/views/RoomView/UploadProgress.tsx b/app/views/RoomView/UploadProgress.tsx
index a6791c3e2..2509870c9 100644
--- a/app/views/RoomView/UploadProgress.tsx
+++ b/app/views/RoomView/UploadProgress.tsx
@@ -112,9 +112,10 @@ class UploadProgress extends Component {
this.ranInitialUploadCheck = true;
+ const { rid } = this.props;
const { uploads } = this.state;
uploads.forEach(async u => {
- if (!isUploadActive(u.path)) {
+ if (!isUploadActive(u.path, rid)) {
try {
const db = database.active;
await db.write(async () => {
@@ -141,8 +142,9 @@ class UploadProgress extends Component {
+ const { rid } = this.props;
try {
- await cancelUpload(item);
+ await cancelUpload(item, rid);
} catch (e) {
log(e);
}
@@ -210,7 +212,7 @@ class UploadProgress extends Component
Date: Thu, 8 Dec 2022 15:38:16 -0300
Subject: [PATCH 7/7] [FIX] Emoji picker not opening in some cases (#4735)
---
app/containers/MessageActions/Header.tsx | 10 ++++++----
app/containers/MessageActions/index.tsx | 6 +++---
app/views/RoomView/index.tsx | 16 +++++++++-------
3 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/app/containers/MessageActions/Header.tsx b/app/containers/MessageActions/Header.tsx
index 26d35d4cc..f9c809e5e 100644
--- a/app/containers/MessageActions/Header.tsx
+++ b/app/containers/MessageActions/Header.tsx
@@ -14,12 +14,12 @@ import { IEmoji, TAnyMessageModel } from '../../definitions';
import Touch from '../Touch';
export interface IHeader {
- handleReaction: (emoji: IEmoji, message: TAnyMessageModel) => void;
+ handleReaction: (emoji: IEmoji | null, message: TAnyMessageModel) => void;
message: TAnyMessageModel;
isMasterDetail: boolean;
}
-type TOnReaction = ({ emoji }: { emoji: IEmoji }) => void;
+type TOnReaction = ({ emoji }: { emoji?: IEmoji }) => void;
interface THeaderItem {
item: IEmoji;
@@ -94,8 +94,10 @@ const Header = React.memo(({ handleReaction, message, isMasterDetail }: IHeader)
const quantity = Math.trunc(size / (ITEM_SIZE + ITEM_MARGIN * 2) - 1);
const onReaction: TOnReaction = ({ emoji }) => {
- handleReaction(emoji, message);
- addFrequentlyUsed(emoji);
+ handleReaction(emoji || null, message);
+ if (emoji) {
+ addFrequentlyUsed(emoji);
+ }
};
const renderItem = ({ item }: { item: IEmoji }) => ;
diff --git a/app/containers/MessageActions/index.tsx b/app/containers/MessageActions/index.tsx
index 925d14613..38d77c14e 100644
--- a/app/containers/MessageActions/index.tsx
+++ b/app/containers/MessageActions/index.tsx
@@ -285,10 +285,10 @@ const MessageActions = React.memo(
}
};
- const handleReaction: IHeader['handleReaction'] = (shortname, message) => {
+ const handleReaction: IHeader['handleReaction'] = (emoji, message) => {
logEvent(events.ROOM_MSG_ACTION_REACTION);
- if (shortname) {
- onReactionPress(shortname, message.id);
+ if (emoji) {
+ onReactionPress(emoji, message.id);
} else {
setTimeout(() => reactionInit(message), ACTION_SHEET_ANIMATION_DURATION);
}
diff --git a/app/views/RoomView/index.tsx b/app/views/RoomView/index.tsx
index 978372aa9..96f556674 100644
--- a/app/views/RoomView/index.tsx
+++ b/app/views/RoomView/index.tsx
@@ -833,13 +833,15 @@ class RoomView extends React.Component {
showReactionPicker = () => {
const { showActionSheet } = this.props;
const { selectedMessage } = this.state;
- showActionSheet({
- children: (
-
- ),
- snaps: [400],
- enableContentPanningGesture: false
- });
+ setTimeout(() => {
+ showActionSheet({
+ children: (
+
+ ),
+ snaps: [400],
+ enableContentPanningGesture: false
+ });
+ }, 100);
};
onReactionInit = (message: TAnyMessageModel) => {