From 7bf1f3c0be4befcfea5b97c9257321634357b5e1 Mon Sep 17 00:00:00 2001
From: Diego Mello <diegolmello@gmail.com>
Date: Fri, 8 Feb 2019 14:34:50 -0200
Subject: [PATCH] [FIX] Reply title should break text (#616)

---
 .../__snapshots__/Storyshots.test.js.snap     | 41 +++++++++++++++++++
 app/containers/message/Reply.js               |  2 +
 storybook/stories/Message.js                  | 20 +++++++++
 3 files changed, 63 insertions(+)

diff --git a/__tests__/__snapshots__/Storyshots.test.js.snap b/__tests__/__snapshots__/Storyshots.test.js.snap
index b9ce35685..17a49bfb1 100644
--- a/__tests__/__snapshots__/Storyshots.test.js.snap
+++ b/__tests__/__snapshots__/Storyshots.test.js.snap
@@ -1156,6 +1156,47 @@ exports[`Storyshots Message list 1`] = `
     >
       View
     </View>
+    <View
+      style={
+        Object {
+          "flexDirection": "row",
+        }
+      }
+    >
+      View
+    </View>
+    <Text
+      style={
+        Array [
+          Object {
+            "fontSize": 20,
+            "fontWeight": "300",
+            "marginLeft": 10,
+            "marginTop": 30,
+          },
+          Object {
+            "marginBottom": 30,
+            "marginTop": 0,
+            "transform": Array [
+              Object {
+                "scaleY": -1,
+              },
+            ],
+          },
+        ]
+      }
+    >
+      Message with reply
+    </Text>
+    <View
+      style={
+        Object {
+          "flexDirection": "row",
+        }
+      }
+    >
+      View
+    </View>
     <Text
       style={
         Array [
diff --git a/app/containers/message/Reply.js b/app/containers/message/Reply.js
index 02632ad5e..34fec98ce 100644
--- a/app/containers/message/Reply.js
+++ b/app/containers/message/Reply.js
@@ -23,10 +23,12 @@ const styles = StyleSheet.create({
 		padding: 15
 	},
 	authorContainer: {
+		flex: 1,
 		flexDirection: 'row',
 		alignItems: 'center'
 	},
 	author: {
+		flex: 1,
 		color: '#1d74f5',
 		fontSize: 18,
 		fontWeight: '500',
diff --git a/storybook/stories/Message.js b/storybook/stories/Message.js
index 4984e088f..6bd0b1e84 100644
--- a/storybook/stories/Message.js
+++ b/storybook/stories/Message.js
@@ -231,6 +231,26 @@ export default (
 		/>
 		<Separator title='With audio' />
 
+		<Message
+			msg="I'm fine!"
+			attachments={[{
+				author_name: 'This is a long title and i\'ll break',
+				ts: date,
+				timeFormat: 'LT',
+				text: 'How are you?'
+			}]}
+		/>
+		<Message
+			msg="I'm fine!"
+			attachments={[{
+				author_name: 'rocket.cat',
+				ts: date,
+				timeFormat: 'LT',
+				text: 'How are you?'
+			}]}
+		/>
+		<Separator title='Message with reply' />
+
 		<Message
 			urls={[{
 				url: 'https://rocket.chat',
-- 
GitLab