Merge branch 'develop' into single-server
This commit is contained in:
commit
f0ee2d62eb
|
@ -248,7 +248,7 @@ commands:
|
||||||
bundle exec fastlane ios build_official
|
bundle exec fastlane ios build_official
|
||||||
else
|
else
|
||||||
if [[ $KEYSTORE ]]; then
|
if [[ $KEYSTORE ]]; then
|
||||||
bundle exec fastlane ios release # TODO: rename
|
bundle exec fastlane ios build_experimental
|
||||||
else
|
else
|
||||||
bundle exec fastlane ios build_fork
|
bundle exec fastlane ios build_fork
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -10220,6 +10220,80 @@ exports[`Storyshots Markdown list Markdown 1`] = `
|
||||||
</Text>
|
</Text>
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
|
<Text
|
||||||
|
style={
|
||||||
|
Array [
|
||||||
|
Object {
|
||||||
|
"fontSize": 20,
|
||||||
|
"fontWeight": "300",
|
||||||
|
"marginLeft": 10,
|
||||||
|
"marginVertical": 30,
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"color": "#0d0e12",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"marginHorizontal": 10,
|
||||||
|
"marginVertical": 10,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
>
|
||||||
|
Sequential empty spaces
|
||||||
|
</Text>
|
||||||
|
<View
|
||||||
|
style={
|
||||||
|
Object {
|
||||||
|
"marginHorizontal": 15,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Text
|
||||||
|
style={
|
||||||
|
Array [
|
||||||
|
Object {
|
||||||
|
"backgroundColor": "transparent",
|
||||||
|
"fontFamily": "System",
|
||||||
|
"fontSize": 16,
|
||||||
|
"fontWeight": "400",
|
||||||
|
"textAlign": "left",
|
||||||
|
},
|
||||||
|
undefined,
|
||||||
|
Object {
|
||||||
|
"color": "#2f343d",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Text
|
||||||
|
accessibilityLabel="a b c"
|
||||||
|
style={
|
||||||
|
Array [
|
||||||
|
Object {
|
||||||
|
"backgroundColor": "transparent",
|
||||||
|
"fontFamily": "System",
|
||||||
|
"fontSize": 16,
|
||||||
|
"fontWeight": "400",
|
||||||
|
"textAlign": "left",
|
||||||
|
},
|
||||||
|
Array [
|
||||||
|
Object {},
|
||||||
|
Object {
|
||||||
|
"alignItems": "flex-start",
|
||||||
|
"flexDirection": "row",
|
||||||
|
"flexWrap": "wrap",
|
||||||
|
"justifyContent": "flex-start",
|
||||||
|
"marginBottom": 0,
|
||||||
|
"marginTop": 0,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
]
|
||||||
|
}
|
||||||
|
>
|
||||||
|
a b c
|
||||||
|
</Text>
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
<Text
|
<Text
|
||||||
style={
|
style={
|
||||||
Array [
|
Array [
|
||||||
|
@ -10382,6 +10456,26 @@ exports[`Storyshots Markdown list Markdown 1`] = `
|
||||||
>
|
>
|
||||||
a b c d e
|
a b c d e
|
||||||
</Text>
|
</Text>
|
||||||
|
<Text
|
||||||
|
accessibilityLabel="a b c"
|
||||||
|
numberOfLines={1}
|
||||||
|
style={
|
||||||
|
Array [
|
||||||
|
Object {
|
||||||
|
"backgroundColor": "transparent",
|
||||||
|
"fontFamily": "System",
|
||||||
|
"fontSize": 16,
|
||||||
|
"fontWeight": "400",
|
||||||
|
"textAlign": "left",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"color": "#2f343d",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
>
|
||||||
|
a b c
|
||||||
|
</Text>
|
||||||
<Text
|
<Text
|
||||||
accessibilityLabel="@rocket.cat @name1 @all @here @unknown #general #unknown"
|
accessibilityLabel="@rocket.cat @name1 @all @here @unknown #general #unknown"
|
||||||
numberOfLines={1}
|
numberOfLines={1}
|
||||||
|
@ -10480,7 +10574,7 @@ exports[`Storyshots Markdown list Markdown 1`] = `
|
||||||
"textAlign": "left",
|
"textAlign": "left",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"color": "#DB0C27",
|
"color": "#F5455C",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -10526,7 +10620,7 @@ exports[`Storyshots Markdown list Markdown 1`] = `
|
||||||
"textAlign": "left",
|
"textAlign": "left",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"color": "#DFAC00",
|
"color": "#F3BE08",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -10571,7 +10665,7 @@ exports[`Storyshots Markdown list Markdown 1`] = `
|
||||||
"textAlign": "left",
|
"textAlign": "left",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"color": "#E26D0E",
|
"color": "#F38C39",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -10616,7 +10710,7 @@ exports[`Storyshots Markdown list Markdown 1`] = `
|
||||||
"textAlign": "left",
|
"textAlign": "left",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"color": "#E26D0E",
|
"color": "#F38C39",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -10727,7 +10821,7 @@ exports[`Storyshots Markdown list Markdown 1`] = `
|
||||||
"textAlign": "left",
|
"textAlign": "left",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"color": "#DB0C27",
|
"color": "#F5455C",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -10773,7 +10867,7 @@ exports[`Storyshots Markdown list Markdown 1`] = `
|
||||||
"textAlign": "left",
|
"textAlign": "left",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"color": "#DFAC00",
|
"color": "#F3BE08",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -10818,7 +10912,7 @@ exports[`Storyshots Markdown list Markdown 1`] = `
|
||||||
"textAlign": "left",
|
"textAlign": "left",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"color": "#E26D0E",
|
"color": "#F38C39",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -10863,7 +10957,7 @@ exports[`Storyshots Markdown list Markdown 1`] = `
|
||||||
"textAlign": "left",
|
"textAlign": "left",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"color": "#E26D0E",
|
"color": "#F38C39",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -10974,7 +11068,7 @@ exports[`Storyshots Markdown list Markdown 1`] = `
|
||||||
"textAlign": "left",
|
"textAlign": "left",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"color": "#DFAC00",
|
"color": "#F3BE08",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -17308,7 +17402,7 @@ exports[`Storyshots Message list message 1`] = `
|
||||||
"marginTop": 6,
|
"marginTop": 6,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
testID="message-thread-replied-on-Thread with emoji🙂 😂"
|
testID="message-thread-replied-on-Thread with emoji :) :joy:"
|
||||||
>
|
>
|
||||||
<Text
|
<Text
|
||||||
allowFontScaling={false}
|
allowFontScaling={false}
|
||||||
|
@ -17334,9 +17428,20 @@ exports[`Storyshots Message list message 1`] = `
|
||||||
|
|
||||||
</Text>
|
</Text>
|
||||||
<Text
|
<Text
|
||||||
|
accessibilityLabel="Thread with emoji🙂 😂"
|
||||||
numberOfLines={1}
|
numberOfLines={1}
|
||||||
style={
|
style={
|
||||||
Array [
|
Array [
|
||||||
|
Object {
|
||||||
|
"backgroundColor": "transparent",
|
||||||
|
"fontFamily": "System",
|
||||||
|
"fontSize": 16,
|
||||||
|
"fontWeight": "400",
|
||||||
|
"textAlign": "left",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"color": "#2f343d",
|
||||||
|
},
|
||||||
Object {
|
Object {
|
||||||
"backgroundColor": "transparent",
|
"backgroundColor": "transparent",
|
||||||
"flex": 1,
|
"flex": 1,
|
||||||
|
@ -21634,7 +21739,7 @@ exports[`Storyshots Message list message 1`] = `
|
||||||
"textAlign": "left",
|
"textAlign": "left",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"color": "#DFAC00",
|
"color": "#F3BE08",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -21681,7 +21786,7 @@ exports[`Storyshots Message list message 1`] = `
|
||||||
"textAlign": "left",
|
"textAlign": "left",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"color": "#DB0C27",
|
"color": "#F5455C",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -21727,7 +21832,7 @@ exports[`Storyshots Message list message 1`] = `
|
||||||
"textAlign": "left",
|
"textAlign": "left",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"color": "#E26D0E",
|
"color": "#F38C39",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -21773,7 +21878,7 @@ exports[`Storyshots Message list message 1`] = `
|
||||||
"textAlign": "left",
|
"textAlign": "left",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"color": "#E26D0E",
|
"color": "#F38C39",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -21820,7 +21925,7 @@ exports[`Storyshots Message list message 1`] = `
|
||||||
"textAlign": "left",
|
"textAlign": "left",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"color": "#DFAC00",
|
"color": "#F3BE08",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -22050,7 +22155,7 @@ exports[`Storyshots Message list message 1`] = `
|
||||||
"textAlign": "left",
|
"textAlign": "left",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"color": "#DFAC00",
|
"color": "#F3BE08",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -22097,7 +22202,7 @@ exports[`Storyshots Message list message 1`] = `
|
||||||
"textAlign": "left",
|
"textAlign": "left",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"color": "#DB0C27",
|
"color": "#F5455C",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -22143,7 +22248,7 @@ exports[`Storyshots Message list message 1`] = `
|
||||||
"textAlign": "left",
|
"textAlign": "left",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"color": "#E26D0E",
|
"color": "#F38C39",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -22189,7 +22294,7 @@ exports[`Storyshots Message list message 1`] = `
|
||||||
"textAlign": "left",
|
"textAlign": "left",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"color": "#E26D0E",
|
"color": "#F38C39",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -22236,7 +22341,7 @@ exports[`Storyshots Message list message 1`] = `
|
||||||
"textAlign": "left",
|
"textAlign": "left",
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
"color": "#DFAC00",
|
"color": "#F3BE08",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -33583,9 +33688,20 @@ exports[`Storyshots Message list message 1`] = `
|
||||||
|
|
||||||
</Text>
|
</Text>
|
||||||
<Text
|
<Text
|
||||||
|
accessibilityLabel="How are you?"
|
||||||
numberOfLines={1}
|
numberOfLines={1}
|
||||||
style={
|
style={
|
||||||
Array [
|
Array [
|
||||||
|
Object {
|
||||||
|
"backgroundColor": "transparent",
|
||||||
|
"fontFamily": "System",
|
||||||
|
"fontSize": 16,
|
||||||
|
"fontWeight": "400",
|
||||||
|
"textAlign": "left",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"color": "#2f343d",
|
||||||
|
},
|
||||||
Object {
|
Object {
|
||||||
"backgroundColor": "transparent",
|
"backgroundColor": "transparent",
|
||||||
"flex": 1,
|
"flex": 1,
|
||||||
|
@ -33786,7 +33902,7 @@ exports[`Storyshots Message list message 1`] = `
|
||||||
"marginTop": 6,
|
"marginTop": 6,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
testID="message-thread-replied-on-Thread with emoji🙂 😂"
|
testID="message-thread-replied-on-Thread with emoji :) :joy:"
|
||||||
>
|
>
|
||||||
<Text
|
<Text
|
||||||
allowFontScaling={false}
|
allowFontScaling={false}
|
||||||
|
@ -33812,9 +33928,20 @@ exports[`Storyshots Message list message 1`] = `
|
||||||
|
|
||||||
</Text>
|
</Text>
|
||||||
<Text
|
<Text
|
||||||
|
accessibilityLabel="Thread with emoji🙂 😂"
|
||||||
numberOfLines={1}
|
numberOfLines={1}
|
||||||
style={
|
style={
|
||||||
Array [
|
Array [
|
||||||
|
Object {
|
||||||
|
"backgroundColor": "transparent",
|
||||||
|
"fontFamily": "System",
|
||||||
|
"fontSize": 16,
|
||||||
|
"fontWeight": "400",
|
||||||
|
"textAlign": "left",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"color": "#2f343d",
|
||||||
|
},
|
||||||
Object {
|
Object {
|
||||||
"backgroundColor": "transparent",
|
"backgroundColor": "transparent",
|
||||||
"flex": 1,
|
"flex": 1,
|
||||||
|
@ -34015,7 +34142,7 @@ exports[`Storyshots Message list message 1`] = `
|
||||||
"marginTop": 6,
|
"marginTop": 6,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
testID="message-thread-replied-on-Markdown: link block code"
|
testID="message-thread-replied-on-Markdown: [link](http://www.google.com/) \`\`\`block code\`\`\`"
|
||||||
>
|
>
|
||||||
<Text
|
<Text
|
||||||
allowFontScaling={false}
|
allowFontScaling={false}
|
||||||
|
@ -34041,9 +34168,20 @@ exports[`Storyshots Message list message 1`] = `
|
||||||
|
|
||||||
</Text>
|
</Text>
|
||||||
<Text
|
<Text
|
||||||
|
accessibilityLabel="Markdown: link block code"
|
||||||
numberOfLines={1}
|
numberOfLines={1}
|
||||||
style={
|
style={
|
||||||
Array [
|
Array [
|
||||||
|
Object {
|
||||||
|
"backgroundColor": "transparent",
|
||||||
|
"fontFamily": "System",
|
||||||
|
"fontSize": 16,
|
||||||
|
"fontWeight": "400",
|
||||||
|
"textAlign": "left",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"color": "#2f343d",
|
||||||
|
},
|
||||||
Object {
|
Object {
|
||||||
"backgroundColor": "transparent",
|
"backgroundColor": "transparent",
|
||||||
"flex": 1,
|
"flex": 1,
|
||||||
|
@ -34270,9 +34408,20 @@ exports[`Storyshots Message list message 1`] = `
|
||||||
|
|
||||||
</Text>
|
</Text>
|
||||||
<Text
|
<Text
|
||||||
|
accessibilityLabel="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
|
||||||
numberOfLines={1}
|
numberOfLines={1}
|
||||||
style={
|
style={
|
||||||
Array [
|
Array [
|
||||||
|
Object {
|
||||||
|
"backgroundColor": "transparent",
|
||||||
|
"fontFamily": "System",
|
||||||
|
"fontSize": 16,
|
||||||
|
"fontWeight": "400",
|
||||||
|
"textAlign": "left",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"color": "#2f343d",
|
||||||
|
},
|
||||||
Object {
|
Object {
|
||||||
"backgroundColor": "transparent",
|
"backgroundColor": "transparent",
|
||||||
"flex": 1,
|
"flex": 1,
|
||||||
|
@ -34499,9 +34648,20 @@ exports[`Storyshots Message list message 1`] = `
|
||||||
|
|
||||||
</Text>
|
</Text>
|
||||||
<Text
|
<Text
|
||||||
|
accessibilityLabel="How are you?"
|
||||||
numberOfLines={1}
|
numberOfLines={1}
|
||||||
style={
|
style={
|
||||||
Array [
|
Array [
|
||||||
|
Object {
|
||||||
|
"backgroundColor": "transparent",
|
||||||
|
"fontFamily": "System",
|
||||||
|
"fontSize": 16,
|
||||||
|
"fontWeight": "400",
|
||||||
|
"textAlign": "left",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"color": "#2f343d",
|
||||||
|
},
|
||||||
Object {
|
Object {
|
||||||
"backgroundColor": "transparent",
|
"backgroundColor": "transparent",
|
||||||
"flex": 1,
|
"flex": 1,
|
||||||
|
@ -34728,9 +34888,20 @@ exports[`Storyshots Message list message 1`] = `
|
||||||
|
|
||||||
</Text>
|
</Text>
|
||||||
<Text
|
<Text
|
||||||
|
accessibilityLabel="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
|
||||||
numberOfLines={1}
|
numberOfLines={1}
|
||||||
style={
|
style={
|
||||||
Array [
|
Array [
|
||||||
|
Object {
|
||||||
|
"backgroundColor": "transparent",
|
||||||
|
"fontFamily": "System",
|
||||||
|
"fontSize": 16,
|
||||||
|
"fontWeight": "400",
|
||||||
|
"textAlign": "left",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"color": "#2f343d",
|
||||||
|
},
|
||||||
Object {
|
Object {
|
||||||
"backgroundColor": "transparent",
|
"backgroundColor": "transparent",
|
||||||
"flex": 1,
|
"flex": 1,
|
||||||
|
@ -34957,9 +35128,20 @@ exports[`Storyshots Message list message 1`] = `
|
||||||
|
|
||||||
</Text>
|
</Text>
|
||||||
<Text
|
<Text
|
||||||
|
accessibilityLabel="Thread with attachment"
|
||||||
numberOfLines={1}
|
numberOfLines={1}
|
||||||
style={
|
style={
|
||||||
Array [
|
Array [
|
||||||
|
Object {
|
||||||
|
"backgroundColor": "transparent",
|
||||||
|
"fontFamily": "System",
|
||||||
|
"fontSize": 16,
|
||||||
|
"fontWeight": "400",
|
||||||
|
"textAlign": "left",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"color": "#2f343d",
|
||||||
|
},
|
||||||
Object {
|
Object {
|
||||||
"backgroundColor": "transparent",
|
"backgroundColor": "transparent",
|
||||||
"flex": 1,
|
"flex": 1,
|
||||||
|
@ -36039,9 +36221,20 @@ exports[`Storyshots Message list message 1`] = `
|
||||||
|
|
||||||
</Text>
|
</Text>
|
||||||
<Text
|
<Text
|
||||||
|
accessibilityLabel="How are you?"
|
||||||
numberOfLines={1}
|
numberOfLines={1}
|
||||||
style={
|
style={
|
||||||
Array [
|
Array [
|
||||||
|
Object {
|
||||||
|
"backgroundColor": "transparent",
|
||||||
|
"fontFamily": "System",
|
||||||
|
"fontSize": 16,
|
||||||
|
"fontWeight": "400",
|
||||||
|
"textAlign": "left",
|
||||||
|
},
|
||||||
|
Object {
|
||||||
|
"color": "#2f343d",
|
||||||
|
},
|
||||||
Object {
|
Object {
|
||||||
"backgroundColor": "transparent",
|
"backgroundColor": "transparent",
|
||||||
"flex": 1,
|
"flex": 1,
|
||||||
|
|
|
@ -11,13 +11,11 @@ export const SWITCH_TRACK_COLOR = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const mentions = {
|
const mentions = {
|
||||||
unreadBackground: '#6C727A',
|
unreadColor: '#6C727A',
|
||||||
tunreadBackground: '#1d74f5',
|
tunreadColor: '#1d74f5',
|
||||||
mentionMeColor: '#DB0C27',
|
mentionMeColor: '#F5455C',
|
||||||
mentionMeBackground: '#F5455C',
|
mentionGroupColor: '#F38C39',
|
||||||
mentionGroupColor: '#E26D0E',
|
mentionOtherColor: '#F3BE08'
|
||||||
mentionGroupBackground: '#F38C39',
|
|
||||||
mentionOtherColor: '#DFAC00'
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const themes = {
|
export const themes = {
|
||||||
|
|
|
@ -384,6 +384,8 @@ class Markdown extends PureComponent {
|
||||||
|
|
||||||
if (preview) {
|
if (preview) {
|
||||||
m = shortnameToUnicode(m);
|
m = shortnameToUnicode(m);
|
||||||
|
// Removes sequential empty spaces
|
||||||
|
m = m.replace(/\s+/g, ' ');
|
||||||
m = removeMarkdown(m);
|
m = removeMarkdown(m);
|
||||||
m = m.replace(/\n+/g, ' ');
|
m = m.replace(/\n+/g, ' ');
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { View, Text } from 'react-native';
|
import { View } from 'react-native';
|
||||||
import removeMarkdown from 'remove-markdown';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
import shortnameToUnicode from '../../utils/shortnameToUnicode';
|
|
||||||
import { CustomIcon } from '../../lib/Icons';
|
import { CustomIcon } from '../../lib/Icons';
|
||||||
import styles from './styles';
|
import styles from './styles';
|
||||||
import { themes } from '../../constants/colors';
|
import { themes } from '../../constants/colors';
|
||||||
import I18n from '../../i18n';
|
import I18n from '../../i18n';
|
||||||
|
import Markdown from '../markdown';
|
||||||
|
|
||||||
const RepliedThread = React.memo(({
|
const RepliedThread = React.memo(({
|
||||||
tmid, tmsg, isHeader, fetchThreadName, id, isEncrypted, theme
|
tmid, tmsg, isHeader, fetchThreadName, id, isEncrypted, theme
|
||||||
|
@ -21,8 +20,7 @@ const RepliedThread = React.memo(({
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
let msg = shortnameToUnicode(tmsg);
|
let msg = tmsg;
|
||||||
msg = removeMarkdown(msg);
|
|
||||||
|
|
||||||
if (isEncrypted) {
|
if (isEncrypted) {
|
||||||
msg = I18n.t('Encrypted_message');
|
msg = I18n.t('Encrypted_message');
|
||||||
|
@ -31,7 +29,13 @@ const RepliedThread = React.memo(({
|
||||||
return (
|
return (
|
||||||
<View style={styles.repliedThread} testID={`message-thread-replied-on-${ msg }`}>
|
<View style={styles.repliedThread} testID={`message-thread-replied-on-${ msg }`}>
|
||||||
<CustomIcon name='threads' size={20} style={styles.repliedThreadIcon} color={themes[theme].tintColor} />
|
<CustomIcon name='threads' size={20} style={styles.repliedThreadIcon} color={themes[theme].tintColor} />
|
||||||
<Text style={[styles.repliedThreadName, { color: themes[theme].tintColor }]} numberOfLines={1}>{msg}</Text>
|
<Markdown
|
||||||
|
msg={msg}
|
||||||
|
theme={theme}
|
||||||
|
style={[styles.repliedThreadName, { color: themes[theme].tintColor }]}
|
||||||
|
preview
|
||||||
|
numberOfLines={1}
|
||||||
|
/>
|
||||||
<View style={styles.repliedThreadDisclosure}>
|
<View style={styles.repliedThreadDisclosure}>
|
||||||
<CustomIcon
|
<CustomIcon
|
||||||
name='chevron-right'
|
name='chevron-right'
|
||||||
|
|
|
@ -7,14 +7,14 @@ export const getUnreadStyle = ({
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
let backgroundColor = themes[theme].unreadBackground;
|
let backgroundColor = themes[theme].unreadColor;
|
||||||
const color = themes[theme].buttonText;
|
const color = themes[theme].buttonText;
|
||||||
if (userMentions > 0 || tunreadUser?.length) {
|
if (userMentions > 0 || tunreadUser?.length) {
|
||||||
backgroundColor = themes[theme].mentionMeBackground;
|
backgroundColor = themes[theme].mentionMeColor;
|
||||||
} else if (groupMentions > 0 || tunreadGroup?.length) {
|
} else if (groupMentions > 0 || tunreadGroup?.length) {
|
||||||
backgroundColor = themes[theme].mentionGroupBackground;
|
backgroundColor = themes[theme].mentionGroupColor;
|
||||||
} else if (tunread?.length > 0) {
|
} else if (tunread?.length > 0) {
|
||||||
backgroundColor = themes[theme].tunreadBackground;
|
backgroundColor = themes[theme].tunreadColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -13,7 +13,7 @@ const testsForTheme = (theme) => {
|
||||||
expect(getUnreadStyleUtil({
|
expect(getUnreadStyleUtil({
|
||||||
unread: 1
|
unread: 1
|
||||||
})).toEqual({
|
})).toEqual({
|
||||||
backgroundColor: themes[theme].unreadBackground,
|
backgroundColor: themes[theme].unreadColor,
|
||||||
color: themes[theme].buttonText
|
color: themes[theme].buttonText
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -22,7 +22,7 @@ const testsForTheme = (theme) => {
|
||||||
expect(getUnreadStyleUtil({
|
expect(getUnreadStyleUtil({
|
||||||
tunread: [1]
|
tunread: [1]
|
||||||
})).toEqual({
|
})).toEqual({
|
||||||
backgroundColor: themes[theme].tunreadBackground,
|
backgroundColor: themes[theme].tunreadColor,
|
||||||
color: themes[theme].buttonText
|
color: themes[theme].buttonText
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -32,7 +32,7 @@ const testsForTheme = (theme) => {
|
||||||
unread: 1,
|
unread: 1,
|
||||||
userMentions: 1
|
userMentions: 1
|
||||||
})).toEqual({
|
})).toEqual({
|
||||||
backgroundColor: themes[theme].mentionMeBackground,
|
backgroundColor: themes[theme].mentionMeColor,
|
||||||
color: themes[theme].buttonText
|
color: themes[theme].buttonText
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -42,7 +42,7 @@ const testsForTheme = (theme) => {
|
||||||
unread: 1,
|
unread: 1,
|
||||||
groupMentions: 1
|
groupMentions: 1
|
||||||
})).toEqual({
|
})).toEqual({
|
||||||
backgroundColor: themes[theme].mentionGroupBackground,
|
backgroundColor: themes[theme].mentionGroupColor,
|
||||||
color: themes[theme].buttonText
|
color: themes[theme].buttonText
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -54,7 +54,7 @@ const testsForTheme = (theme) => {
|
||||||
groupMentions: 1,
|
groupMentions: 1,
|
||||||
tunread: [1]
|
tunread: [1]
|
||||||
})).toEqual({
|
})).toEqual({
|
||||||
backgroundColor: themes[theme].mentionMeBackground,
|
backgroundColor: themes[theme].mentionMeColor,
|
||||||
color: themes[theme].buttonText
|
color: themes[theme].buttonText
|
||||||
});
|
});
|
||||||
expect(getUnreadStyleUtil({
|
expect(getUnreadStyleUtil({
|
||||||
|
@ -62,14 +62,14 @@ const testsForTheme = (theme) => {
|
||||||
groupMentions: 1,
|
groupMentions: 1,
|
||||||
tunread: [1]
|
tunread: [1]
|
||||||
})).toEqual({
|
})).toEqual({
|
||||||
backgroundColor: themes[theme].mentionGroupBackground,
|
backgroundColor: themes[theme].mentionGroupColor,
|
||||||
color: themes[theme].buttonText
|
color: themes[theme].buttonText
|
||||||
});
|
});
|
||||||
expect(getUnreadStyleUtil({
|
expect(getUnreadStyleUtil({
|
||||||
unread: 1,
|
unread: 1,
|
||||||
tunread: [1]
|
tunread: [1]
|
||||||
})).toEqual({
|
})).toEqual({
|
||||||
backgroundColor: themes[theme].tunreadBackground,
|
backgroundColor: themes[theme].tunreadColor,
|
||||||
color: themes[theme].buttonText
|
color: themes[theme].buttonText
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -34,13 +34,13 @@ export const formatDateThreads = date => moment(date).calendar(null, {
|
||||||
|
|
||||||
export const getBadgeColor = ({ subscription, messageId, theme }) => {
|
export const getBadgeColor = ({ subscription, messageId, theme }) => {
|
||||||
if (subscription?.tunreadUser?.includes(messageId)) {
|
if (subscription?.tunreadUser?.includes(messageId)) {
|
||||||
return themes[theme].mentionMeBackground;
|
return themes[theme].mentionMeColor;
|
||||||
}
|
}
|
||||||
if (subscription?.tunreadGroup?.includes(messageId)) {
|
if (subscription?.tunreadGroup?.includes(messageId)) {
|
||||||
return themes[theme].mentionGroupBackground;
|
return themes[theme].mentionGroupColor;
|
||||||
}
|
}
|
||||||
if (subscription?.tunread?.includes(messageId)) {
|
if (subscription?.tunread?.includes(messageId)) {
|
||||||
return themes[theme].tunreadBackground;
|
return themes[theme].tunreadColor;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -53,20 +53,16 @@ class List extends React.Component {
|
||||||
this.count = 0;
|
this.count = 0;
|
||||||
this.needsFetch = false;
|
this.needsFetch = false;
|
||||||
this.mounted = false;
|
this.mounted = false;
|
||||||
|
this.animated = false;
|
||||||
this.state = {
|
this.state = {
|
||||||
loading: true,
|
loading: true,
|
||||||
end: false,
|
end: false,
|
||||||
messages: [],
|
messages: [],
|
||||||
refreshing: false,
|
refreshing: false
|
||||||
animated: false
|
|
||||||
};
|
};
|
||||||
this.query();
|
this.query();
|
||||||
this.unsubscribeFocus = props.navigation.addListener('focus', () => {
|
this.unsubscribeFocus = props.navigation.addListener('focus', () => {
|
||||||
if (this.mounted) {
|
this.animated = true;
|
||||||
this.setState({ animated: true });
|
|
||||||
} else {
|
|
||||||
this.state.animated = true;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
console.timeEnd(`${ this.constructor.name } init`);
|
console.timeEnd(`${ this.constructor.name } init`);
|
||||||
}
|
}
|
||||||
|
@ -290,8 +286,7 @@ class List extends React.Component {
|
||||||
|
|
||||||
// eslint-disable-next-line react/sort-comp
|
// eslint-disable-next-line react/sort-comp
|
||||||
update = () => {
|
update = () => {
|
||||||
const { animated } = this.state;
|
if (this.animated) {
|
||||||
if (animated) {
|
|
||||||
animateNextTransition();
|
animateNextTransition();
|
||||||
}
|
}
|
||||||
this.forceUpdate();
|
this.forceUpdate();
|
||||||
|
|
|
@ -1008,12 +1008,7 @@ class RoomView extends React.Component {
|
||||||
|
|
||||||
renderActions = () => {
|
renderActions = () => {
|
||||||
const { room, readOnly } = this.state;
|
const { room, readOnly } = this.state;
|
||||||
const {
|
const { user } = this.props;
|
||||||
user, navigation
|
|
||||||
} = this.props;
|
|
||||||
if (!navigation.isFocused()) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<MessageActions
|
<MessageActions
|
||||||
|
|
|
@ -105,21 +105,21 @@ stories.add('content', () => (
|
||||||
stories.add('badge', () => (
|
stories.add('badge', () => (
|
||||||
<>
|
<>
|
||||||
<BaseItem
|
<BaseItem
|
||||||
badgeColor={themes.light.mentionMeBackground}
|
badgeColor={themes.light.mentionMeColor}
|
||||||
/>
|
/>
|
||||||
<List.Separator />
|
<List.Separator />
|
||||||
<BaseItem
|
<BaseItem
|
||||||
badgeColor={themes.light.mentionGroupBackground}
|
badgeColor={themes.light.mentionGroupColor}
|
||||||
/>
|
/>
|
||||||
<List.Separator />
|
<List.Separator />
|
||||||
<BaseItem
|
<BaseItem
|
||||||
badgeColor={themes.light.tunreadBackground}
|
badgeColor={themes.light.tunreadColor}
|
||||||
/>
|
/>
|
||||||
<BaseItem
|
<BaseItem
|
||||||
item={{
|
item={{
|
||||||
msg: longText
|
msg: longText
|
||||||
}}
|
}}
|
||||||
badgeColor={themes.light.tunreadBackground}
|
badgeColor={themes.light.tunreadColor}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
));
|
));
|
||||||
|
@ -129,7 +129,7 @@ const ThemeStory = ({ theme }) => (
|
||||||
value={{ theme }}
|
value={{ theme }}
|
||||||
>
|
>
|
||||||
<BaseItem
|
<BaseItem
|
||||||
badgeColor={themes[theme].mentionMeBackground}
|
badgeColor={themes[theme].mentionMeColor}
|
||||||
/>
|
/>
|
||||||
</ThemeContext.Provider>
|
</ThemeContext.Provider>
|
||||||
);
|
);
|
||||||
|
|
|
@ -42,7 +42,7 @@ platform :ios do
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Build Experimental app"
|
desc "Build Experimental app"
|
||||||
lane :release do
|
lane :build_experimental do
|
||||||
api_key = app_store_connect_api_key(
|
api_key = app_store_connect_api_key(
|
||||||
key_id: "F296L2294Y",
|
key_id: "F296L2294Y",
|
||||||
issuer_id: "69a6de8e-75cf-47e3-e053-5b8c7c11a4d1",
|
issuer_id: "69a6de8e-75cf-47e3-e053-5b8c7c11a4d1",
|
||||||
|
@ -60,11 +60,6 @@ platform :ios do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Build fork app"
|
|
||||||
lane :build_fork do
|
|
||||||
gym(scheme: "RocketChatRN", workspace: "RocketChatRN.xcworkspace", skip_codesigning: true, skip_archive: true)
|
|
||||||
end
|
|
||||||
|
|
||||||
desc "Build Official app"
|
desc "Build Official app"
|
||||||
lane :build_official do
|
lane :build_official do
|
||||||
sh "../../scripts/prepare_ios_official.sh"
|
sh "../../scripts/prepare_ios_official.sh"
|
||||||
|
@ -100,6 +95,11 @@ platform :ios do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc "Build fork app"
|
||||||
|
lane :build_fork do
|
||||||
|
gym(scheme: "RocketChatRN", workspace: "RocketChatRN.xcworkspace", skip_codesigning: true, skip_archive: true)
|
||||||
|
end
|
||||||
|
|
||||||
after_all do |lane|
|
after_all do |lane|
|
||||||
delete_keychain(name: ENV["MATCH_KEYCHAIN_NAME"])
|
delete_keychain(name: ENV["MATCH_KEYCHAIN_NAME"])
|
||||||
end
|
end
|
||||||
|
|
|
@ -26,6 +26,7 @@ d
|
||||||
|
|
||||||
|
|
||||||
e`;
|
e`;
|
||||||
|
const sequentialEmptySpacesText = 'a b c';
|
||||||
|
|
||||||
const getCustomEmoji = (content) => {
|
const getCustomEmoji = (content) => {
|
||||||
const customEmoji = {
|
const customEmoji = {
|
||||||
|
@ -69,6 +70,14 @@ export default ({ theme }) => {
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
<StoriesSeparator style={styles.separator} title='Sequential empty spaces' theme={theme} />
|
||||||
|
<View style={styles.container}>
|
||||||
|
<Markdown
|
||||||
|
msg={sequentialEmptySpacesText}
|
||||||
|
theme={theme}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
|
||||||
<StoriesSeparator style={styles.separator} title='Edited' theme={theme} />
|
<StoriesSeparator style={styles.separator} title='Edited' theme={theme} />
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<Markdown
|
<Markdown
|
||||||
|
@ -92,6 +101,12 @@ export default ({ theme }) => {
|
||||||
numberOfLines={1}
|
numberOfLines={1}
|
||||||
preview
|
preview
|
||||||
/>
|
/>
|
||||||
|
<Markdown
|
||||||
|
msg={sequentialEmptySpacesText}
|
||||||
|
theme={theme}
|
||||||
|
numberOfLines={1}
|
||||||
|
preview
|
||||||
|
/>
|
||||||
<Markdown
|
<Markdown
|
||||||
msg='@rocket.cat @name1 @all @here @unknown #general #unknown'
|
msg='@rocket.cat @name1 @all @here @unknown #general #unknown'
|
||||||
theme={theme}
|
theme={theme}
|
||||||
|
|
|
@ -64,7 +64,7 @@ const messageDecorator = story => (
|
||||||
onReactionPress: () => {},
|
onReactionPress: () => {},
|
||||||
onDiscussionPress: () => {},
|
onDiscussionPress: () => {},
|
||||||
onReactionLongPress: () => {},
|
onReactionLongPress: () => {},
|
||||||
threadBadgeColor: themes.light.tunreadBackground
|
threadBadgeColor: themes.light.tunreadColor
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{story()}
|
{story()}
|
||||||
|
|
Loading…
Reference in New Issue