From 69e04a4c268b7533c4edca907b9012cbb22be731 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo <guilhermegazzo@gmail.com> Date: Fri, 16 Feb 2018 14:02:04 -0200 Subject: [PATCH] snap --- __tests__/RoomItem.js | 2 +- __tests__/__snapshots__/RoomItem.js.snap | 237 +++++--- .../__snapshots__/Storyshots.test.js.snap | 558 +++++++++++++----- app/containers/status.js | 2 +- app/presentation/RoomItem.js | 2 +- 5 files changed, 556 insertions(+), 245 deletions(-) diff --git a/__tests__/RoomItem.js b/__tests__/RoomItem.js index cc4d76d28..253b5d45c 100644 --- a/__tests__/RoomItem.js +++ b/__tests__/RoomItem.js @@ -3,7 +3,7 @@ import { Provider } from 'react-redux'; import { createStore, combineReducers } from 'redux'; -const reducers = combineReducers({settings:() => ({})}); +const reducers = combineReducers({login:() => ({user: {}}), settings:() => ({})}); const store = createStore(reducers); import React from 'react'; diff --git a/__tests__/__snapshots__/RoomItem.js.snap b/__tests__/__snapshots__/RoomItem.js.snap index cdcb1f8ef..4bb3753e8 100644 --- a/__tests__/__snapshots__/RoomItem.js.snap +++ b/__tests__/__snapshots__/RoomItem.js.snap @@ -33,7 +33,7 @@ exports[`render channel 1`] = ` style={ Array [ Object { - "alignItems": "flex-start", + "alignItems": "center", "borderBottomColor": "#ddd", "borderBottomWidth": 0.5, "flexDirection": "row", @@ -50,13 +50,12 @@ exports[`render channel 1`] = ` Object { "alignItems": "center", "justifyContent": "center", - "overflow": "hidden", }, Object { "backgroundColor": "#00BCD4", "borderRadius": 4, - "height": 56, - "width": 56, + "height": 46, + "width": 46, }, undefined, ] @@ -77,7 +76,7 @@ exports[`render channel 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28, + "fontSize": 23, }, ], Object { @@ -118,13 +117,15 @@ exports[`render channel 1`] = ` ellipsizeMode="tail" numberOfLines={1} style={ - Object { - "color": "#444", - "flex": 1, - "fontSize": 18, - "fontWeight": "bold", - "marginRight": 8, - } + Array [ + Object { + "color": "#444", + "flex": 1, + "fontSize": 18, + "marginRight": 8, + }, + undefined, + ] } > general @@ -149,10 +150,10 @@ exports[`render channel 1`] = ` <View style={ Object { - "alignItems": "center", + "alignItems": "flex-end", "flex": 1, "flexDirection": "row", - "justifyContent": "center", + "justifyContent": "flex-end", "width": "100%", } } @@ -196,7 +197,7 @@ exports[`render no icon 1`] = ` style={ Array [ Object { - "alignItems": "flex-start", + "alignItems": "center", "borderBottomColor": "#ddd", "borderBottomWidth": 0.5, "flexDirection": "row", @@ -213,13 +214,12 @@ exports[`render no icon 1`] = ` Object { "alignItems": "center", "justifyContent": "center", - "overflow": "hidden", }, Object { "backgroundColor": "#3F51B5", "borderRadius": 4, - "height": 56, - "width": 56, + "height": 46, + "width": 46, }, undefined, ] @@ -240,7 +240,7 @@ exports[`render no icon 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28, + "fontSize": 23, }, ], Object { @@ -281,13 +281,15 @@ exports[`render no icon 1`] = ` ellipsizeMode="tail" numberOfLines={1} style={ - Object { - "color": "#444", - "flex": 1, - "fontSize": 18, - "fontWeight": "bold", - "marginRight": 8, - } + Array [ + Object { + "color": "#444", + "flex": 1, + "fontSize": 18, + "marginRight": 8, + }, + undefined, + ] } > name @@ -312,10 +314,10 @@ exports[`render no icon 1`] = ` <View style={ Object { - "alignItems": "center", + "alignItems": "flex-end", "flex": 1, "flexDirection": "row", - "justifyContent": "center", + "justifyContent": "flex-end", "width": "100%", } } @@ -359,7 +361,7 @@ exports[`render private group 1`] = ` style={ Array [ Object { - "alignItems": "flex-start", + "alignItems": "center", "borderBottomColor": "#ddd", "borderBottomWidth": 0.5, "flexDirection": "row", @@ -376,13 +378,12 @@ exports[`render private group 1`] = ` Object { "alignItems": "center", "justifyContent": "center", - "overflow": "hidden", }, Object { "backgroundColor": "#FF9800", "borderRadius": 4, - "height": 56, - "width": 56, + "height": 46, + "width": 46, }, undefined, ] @@ -403,7 +404,7 @@ exports[`render private group 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28, + "fontSize": 23, }, ], Object { @@ -444,13 +445,15 @@ exports[`render private group 1`] = ` ellipsizeMode="tail" numberOfLines={1} style={ - Object { - "color": "#444", - "flex": 1, - "fontSize": 18, - "fontWeight": "bold", - "marginRight": 8, - } + Array [ + Object { + "color": "#444", + "flex": 1, + "fontSize": 18, + "marginRight": 8, + }, + undefined, + ] } > private-group @@ -475,10 +478,10 @@ exports[`render private group 1`] = ` <View style={ Object { - "alignItems": "center", + "alignItems": "flex-end", "flex": 1, "flexDirection": "row", - "justifyContent": "center", + "justifyContent": "flex-end", "width": "100%", } } @@ -523,7 +526,7 @@ exports[`render unread +999 1`] = ` style={ Array [ Object { - "alignItems": "flex-start", + "alignItems": "center", "borderBottomColor": "#ddd", "borderBottomWidth": 0.5, "flexDirection": "row", @@ -540,13 +543,12 @@ exports[`render unread +999 1`] = ` Object { "alignItems": "center", "justifyContent": "center", - "overflow": "hidden", }, Object { "backgroundColor": "#3F51B5", "borderRadius": 4, - "height": 56, - "width": 56, + "height": 46, + "width": 46, }, undefined, ] @@ -562,7 +564,7 @@ exports[`render unread +999 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28, + "fontSize": 23, }, ] } @@ -570,6 +572,27 @@ exports[`render unread +999 1`] = ` NA </Text> + <View + style={ + Array [ + Object { + "borderRadius": 16, + "height": 16, + "width": 16, + }, + Object { + "borderColor": "#fff", + "borderWidth": 3, + "bottom": -3, + "position": "absolute", + "right": -3, + }, + Object { + "backgroundColor": "#cbced1", + }, + ] + } + /> </View> <View style={ @@ -598,13 +621,15 @@ exports[`render unread +999 1`] = ` ellipsizeMode="tail" numberOfLines={1} style={ - Object { - "color": "#444", - "flex": 1, - "fontSize": 18, - "fontWeight": "bold", - "marginRight": 8, - } + Array [ + Object { + "color": "#444", + "flex": 1, + "fontSize": 18, + "marginRight": 8, + }, + undefined, + ] } > name @@ -629,10 +654,10 @@ exports[`render unread +999 1`] = ` <View style={ Object { - "alignItems": "center", + "alignItems": "flex-end", "flex": 1, "flexDirection": "row", - "justifyContent": "center", + "justifyContent": "flex-end", "width": "100%", } } @@ -699,7 +724,7 @@ exports[`render unread 1`] = ` style={ Array [ Object { - "alignItems": "flex-start", + "alignItems": "center", "borderBottomColor": "#ddd", "borderBottomWidth": 0.5, "flexDirection": "row", @@ -716,13 +741,12 @@ exports[`render unread 1`] = ` Object { "alignItems": "center", "justifyContent": "center", - "overflow": "hidden", }, Object { "backgroundColor": "#3F51B5", "borderRadius": 4, - "height": 56, - "width": 56, + "height": 46, + "width": 46, }, undefined, ] @@ -738,7 +762,7 @@ exports[`render unread 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28, + "fontSize": 23, }, ] } @@ -746,6 +770,27 @@ exports[`render unread 1`] = ` NA </Text> + <View + style={ + Array [ + Object { + "borderRadius": 16, + "height": 16, + "width": 16, + }, + Object { + "borderColor": "#fff", + "borderWidth": 3, + "bottom": -3, + "position": "absolute", + "right": -3, + }, + Object { + "backgroundColor": "#cbced1", + }, + ] + } + /> </View> <View style={ @@ -774,13 +819,15 @@ exports[`render unread 1`] = ` ellipsizeMode="tail" numberOfLines={1} style={ - Object { - "color": "#444", - "flex": 1, - "fontSize": 18, - "fontWeight": "bold", - "marginRight": 8, - } + Array [ + Object { + "color": "#444", + "flex": 1, + "fontSize": 18, + "marginRight": 8, + }, + undefined, + ] } > name @@ -805,10 +852,10 @@ exports[`render unread 1`] = ` <View style={ Object { - "alignItems": "center", + "alignItems": "flex-end", "flex": 1, "flexDirection": "row", - "justifyContent": "center", + "justifyContent": "flex-end", "width": "100%", } } @@ -875,7 +922,7 @@ exports[`renders correctly 1`] = ` style={ Array [ Object { - "alignItems": "flex-start", + "alignItems": "center", "borderBottomColor": "#ddd", "borderBottomWidth": 0.5, "flexDirection": "row", @@ -892,13 +939,12 @@ exports[`renders correctly 1`] = ` Object { "alignItems": "center", "justifyContent": "center", - "overflow": "hidden", }, Object { "backgroundColor": "#3F51B5", "borderRadius": 4, - "height": 56, - "width": 56, + "height": 46, + "width": 46, }, undefined, ] @@ -914,7 +960,7 @@ exports[`renders correctly 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28, + "fontSize": 23, }, ] } @@ -922,6 +968,27 @@ exports[`renders correctly 1`] = ` NA </Text> + <View + style={ + Array [ + Object { + "borderRadius": 16, + "height": 16, + "width": 16, + }, + Object { + "borderColor": "#fff", + "borderWidth": 3, + "bottom": -3, + "position": "absolute", + "right": -3, + }, + Object { + "backgroundColor": "#cbced1", + }, + ] + } + /> </View> <View style={ @@ -950,13 +1017,15 @@ exports[`renders correctly 1`] = ` ellipsizeMode="tail" numberOfLines={1} style={ - Object { - "color": "#444", - "flex": 1, - "fontSize": 18, - "fontWeight": "bold", - "marginRight": 8, - } + Array [ + Object { + "color": "#444", + "flex": 1, + "fontSize": 18, + "marginRight": 8, + }, + undefined, + ] } > name @@ -981,10 +1050,10 @@ exports[`renders correctly 1`] = ` <View style={ Object { - "alignItems": "center", + "alignItems": "flex-end", "flex": 1, "flexDirection": "row", - "justifyContent": "center", + "justifyContent": "flex-end", "width": "100%", } } diff --git a/__tests__/__snapshots__/Storyshots.test.js.snap b/__tests__/__snapshots__/Storyshots.test.js.snap index 8c21680da..185c7371d 100644 --- a/__tests__/__snapshots__/Storyshots.test.js.snap +++ b/__tests__/__snapshots__/Storyshots.test.js.snap @@ -9,7 +9,6 @@ exports[`Storyshots Avatar avatar 1`] = ` Object { "alignItems": "center", "justifyContent": "center", - "overflow": "hidden", }, Object { "backgroundColor": "#3F51B5", @@ -46,7 +45,6 @@ exports[`Storyshots Avatar avatar 1`] = ` Object { "alignItems": "center", "justifyContent": "center", - "overflow": "hidden", }, Object { "backgroundColor": "#9C27B0", @@ -83,7 +81,6 @@ exports[`Storyshots Avatar avatar 1`] = ` Object { "alignItems": "center", "justifyContent": "center", - "overflow": "hidden", }, Object { "backgroundColor": "#9C27B0", @@ -120,7 +117,6 @@ exports[`Storyshots Avatar avatar 1`] = ` Object { "alignItems": "center", "justifyContent": "center", - "overflow": "hidden", }, Object { "backgroundColor": "#3F51B5", @@ -189,7 +185,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` style={ Array [ Object { - "alignItems": "flex-start", + "alignItems": "center", "borderBottomColor": "#ddd", "borderBottomWidth": 0.5, "flexDirection": "row", @@ -206,13 +202,12 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` Object { "alignItems": "center", "justifyContent": "center", - "overflow": "hidden", }, Object { "backgroundColor": "#8BC34A", "borderRadius": 4, - "height": 56, - "width": 56, + "height": 46, + "width": 46, }, undefined, ] @@ -228,7 +223,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28, + "fontSize": 23, }, ] } @@ -236,6 +231,27 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` RC </Text> + <View + style={ + Array [ + Object { + "borderRadius": 16, + "height": 16, + "width": 16, + }, + Object { + "borderColor": "#fff", + "borderWidth": 3, + "bottom": -3, + "position": "absolute", + "right": -3, + }, + Object { + "backgroundColor": "#cbced1", + }, + ] + } + /> </View> <View style={ @@ -264,13 +280,15 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` ellipsizeMode="tail" numberOfLines={1} style={ - Object { - "color": "#444", - "flex": 1, - "fontSize": 18, - "fontWeight": "bold", - "marginRight": 8, - } + Array [ + Object { + "color": "#444", + "flex": 1, + "fontSize": 18, + "marginRight": 8, + }, + undefined, + ] } > rocket.cat @@ -295,10 +313,10 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` <View style={ Object { - "alignItems": "center", + "alignItems": "flex-end", "flex": 1, "flexDirection": "row", - "justifyContent": "center", + "justifyContent": "flex-end", "width": "100%", } } @@ -337,7 +355,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` style={ Array [ Object { - "alignItems": "flex-start", + "alignItems": "center", "borderBottomColor": "#ddd", "borderBottomWidth": 0.5, "flexDirection": "row", @@ -354,13 +372,12 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` Object { "alignItems": "center", "justifyContent": "center", - "overflow": "hidden", }, Object { "backgroundColor": "#8BC34A", "borderRadius": 4, - "height": 56, - "width": 56, + "height": 46, + "width": 46, }, undefined, ] @@ -376,7 +393,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28, + "fontSize": 23, }, ] } @@ -384,6 +401,27 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` RC </Text> + <View + style={ + Array [ + Object { + "borderRadius": 16, + "height": 16, + "width": 16, + }, + Object { + "borderColor": "#fff", + "borderWidth": 3, + "bottom": -3, + "position": "absolute", + "right": -3, + }, + Object { + "backgroundColor": "#cbced1", + }, + ] + } + /> </View> <View style={ @@ -412,13 +450,17 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` ellipsizeMode="tail" numberOfLines={1} style={ - Object { - "color": "#444", - "flex": 1, - "fontSize": 18, - "fontWeight": "bold", - "marginRight": 8, - } + Array [ + Object { + "color": "#444", + "flex": 1, + "fontSize": 18, + "marginRight": 8, + }, + Object { + "fontWeight": "bold", + }, + ] } > rocket.cat @@ -443,10 +485,10 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` <View style={ Object { - "alignItems": "center", + "alignItems": "flex-end", "flex": 1, "flexDirection": "row", - "justifyContent": "center", + "justifyContent": "flex-end", "width": "100%", } } @@ -485,7 +527,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` style={ Array [ Object { - "alignItems": "flex-start", + "alignItems": "center", "borderBottomColor": "#ddd", "borderBottomWidth": 0.5, "flexDirection": "row", @@ -502,13 +544,12 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` Object { "alignItems": "center", "justifyContent": "center", - "overflow": "hidden", }, Object { "backgroundColor": "#8BC34A", "borderRadius": 4, - "height": 56, - "width": 56, + "height": 46, + "width": 46, }, undefined, ] @@ -524,7 +565,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28, + "fontSize": 23, }, ] } @@ -532,6 +573,27 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` RC </Text> + <View + style={ + Array [ + Object { + "borderRadius": 16, + "height": 16, + "width": 16, + }, + Object { + "borderColor": "#fff", + "borderWidth": 3, + "bottom": -3, + "position": "absolute", + "right": -3, + }, + Object { + "backgroundColor": "#cbced1", + }, + ] + } + /> </View> <View style={ @@ -560,13 +622,15 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` ellipsizeMode="tail" numberOfLines={1} style={ - Object { - "color": "#444", - "flex": 1, - "fontSize": 18, - "fontWeight": "bold", - "marginRight": 8, - } + Array [ + Object { + "color": "#444", + "flex": 1, + "fontSize": 18, + "marginRight": 8, + }, + undefined, + ] } > rocket.cat @@ -591,10 +655,10 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` <View style={ Object { - "alignItems": "center", + "alignItems": "flex-end", "flex": 1, "flexDirection": "row", - "justifyContent": "center", + "justifyContent": "flex-end", "width": "100%", } } @@ -656,7 +720,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` style={ Array [ Object { - "alignItems": "flex-start", + "alignItems": "center", "borderBottomColor": "#ddd", "borderBottomWidth": 0.5, "flexDirection": "row", @@ -673,13 +737,12 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` Object { "alignItems": "center", "justifyContent": "center", - "overflow": "hidden", }, Object { "backgroundColor": "#795548", "borderRadius": 4, - "height": 56, - "width": 56, + "height": 46, + "width": 46, }, undefined, ] @@ -695,7 +758,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28, + "fontSize": 23, }, ] } @@ -703,6 +766,27 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` LC </Text> + <View + style={ + Array [ + Object { + "borderRadius": 16, + "height": 16, + "width": 16, + }, + Object { + "borderColor": "#fff", + "borderWidth": 3, + "bottom": -3, + "position": "absolute", + "right": -3, + }, + Object { + "backgroundColor": "#cbced1", + }, + ] + } + /> </View> <View style={ @@ -731,13 +815,17 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` ellipsizeMode="tail" numberOfLines={1} style={ - Object { - "color": "#444", - "flex": 1, - "fontSize": 18, - "fontWeight": "bold", - "marginRight": 8, - } + Array [ + Object { + "color": "#444", + "flex": 1, + "fontSize": 18, + "marginRight": 8, + }, + Object { + "fontWeight": "bold", + }, + ] } > Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's 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 @@ -762,10 +850,10 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` <View style={ Object { - "alignItems": "center", + "alignItems": "flex-end", "flex": 1, "flexDirection": "row", - "justifyContent": "center", + "justifyContent": "flex-end", "width": "100%", } } @@ -827,7 +915,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` style={ Array [ Object { - "alignItems": "flex-start", + "alignItems": "center", "borderBottomColor": "#ddd", "borderBottomWidth": 0.5, "flexDirection": "row", @@ -844,13 +932,12 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` Object { "alignItems": "center", "justifyContent": "center", - "overflow": "hidden", }, Object { "backgroundColor": "#795548", "borderRadius": 4, - "height": 56, - "width": 56, + "height": 46, + "width": 46, }, undefined, ] @@ -866,7 +953,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28, + "fontSize": 23, }, ] } @@ -874,6 +961,27 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` LC </Text> + <View + style={ + Array [ + Object { + "borderRadius": 16, + "height": 16, + "width": 16, + }, + Object { + "borderColor": "#fff", + "borderWidth": 3, + "bottom": -3, + "position": "absolute", + "right": -3, + }, + Object { + "backgroundColor": "#cbced1", + }, + ] + } + /> </View> <View style={ @@ -902,13 +1010,15 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` ellipsizeMode="tail" numberOfLines={1} style={ - Object { - "color": "#444", - "flex": 1, - "fontSize": 18, - "fontWeight": "bold", - "marginRight": 8, - } + Array [ + Object { + "color": "#444", + "flex": 1, + "fontSize": 18, + "marginRight": 8, + }, + undefined, + ] } > Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's 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 @@ -933,10 +1043,10 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` <View style={ Object { - "alignItems": "center", + "alignItems": "flex-end", "flex": 1, "flexDirection": "row", - "justifyContent": "center", + "justifyContent": "flex-end", "width": "100%", } } @@ -998,7 +1108,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` style={ Array [ Object { - "alignItems": "flex-start", + "alignItems": "center", "borderBottomColor": "#ddd", "borderBottomWidth": 0.5, "flexDirection": "row", @@ -1015,13 +1125,12 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` Object { "alignItems": "center", "justifyContent": "center", - "overflow": "hidden", }, Object { "backgroundColor": "#795548", "borderRadius": 4, - "height": 56, - "width": 56, + "height": 46, + "width": 46, }, undefined, ] @@ -1037,7 +1146,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28, + "fontSize": 23, }, ] } @@ -1045,6 +1154,27 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` LC </Text> + <View + style={ + Array [ + Object { + "borderRadius": 16, + "height": 16, + "width": 16, + }, + Object { + "borderColor": "#fff", + "borderWidth": 3, + "bottom": -3, + "position": "absolute", + "right": -3, + }, + Object { + "backgroundColor": "#cbced1", + }, + ] + } + /> </View> <View style={ @@ -1073,13 +1203,15 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` ellipsizeMode="tail" numberOfLines={1} style={ - Object { - "color": "#444", - "flex": 1, - "fontSize": 18, - "fontWeight": "bold", - "marginRight": 8, - } + Array [ + Object { + "color": "#444", + "flex": 1, + "fontSize": 18, + "marginRight": 8, + }, + undefined, + ] } > Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's 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 @@ -1104,10 +1236,10 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` <View style={ Object { - "alignItems": "center", + "alignItems": "flex-end", "flex": 1, "flexDirection": "row", - "justifyContent": "center", + "justifyContent": "flex-end", "width": "100%", } } @@ -1169,7 +1301,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` style={ Array [ Object { - "alignItems": "flex-start", + "alignItems": "center", "borderBottomColor": "#ddd", "borderBottomWidth": 0.5, "flexDirection": "row", @@ -1186,13 +1318,12 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` Object { "alignItems": "center", "justifyContent": "center", - "overflow": "hidden", }, Object { "backgroundColor": "#795548", "borderRadius": 4, - "height": 56, - "width": 56, + "height": 46, + "width": 46, }, undefined, ] @@ -1208,7 +1339,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28, + "fontSize": 23, }, ] } @@ -1216,6 +1347,27 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` LC </Text> + <View + style={ + Array [ + Object { + "borderRadius": 16, + "height": 16, + "width": 16, + }, + Object { + "borderColor": "#fff", + "borderWidth": 3, + "bottom": -3, + "position": "absolute", + "right": -3, + }, + Object { + "backgroundColor": "#cbced1", + }, + ] + } + /> </View> <View style={ @@ -1244,13 +1396,15 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` ellipsizeMode="tail" numberOfLines={1} style={ - Object { - "color": "#444", - "flex": 1, - "fontSize": 18, - "fontWeight": "bold", - "marginRight": 8, - } + Array [ + Object { + "color": "#444", + "flex": 1, + "fontSize": 18, + "marginRight": 8, + }, + undefined, + ] } > Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's 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 @@ -1275,10 +1429,10 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` <View style={ Object { - "alignItems": "center", + "alignItems": "flex-end", "flex": 1, "flexDirection": "row", - "justifyContent": "center", + "justifyContent": "flex-end", "width": "100%", } } @@ -1340,7 +1494,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` style={ Array [ Object { - "alignItems": "flex-start", + "alignItems": "center", "borderBottomColor": "#ddd", "borderBottomWidth": 0.5, "flexDirection": "row", @@ -1357,13 +1511,12 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` Object { "alignItems": "center", "justifyContent": "center", - "overflow": "hidden", }, Object { "backgroundColor": "#795548", "borderRadius": 4, - "height": 56, - "width": 56, + "height": 46, + "width": 46, }, undefined, ] @@ -1379,7 +1532,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28, + "fontSize": 23, }, ] } @@ -1387,6 +1540,27 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` LC </Text> + <View + style={ + Array [ + Object { + "borderRadius": 16, + "height": 16, + "width": 16, + }, + Object { + "borderColor": "#fff", + "borderWidth": 3, + "bottom": -3, + "position": "absolute", + "right": -3, + }, + Object { + "backgroundColor": "#cbced1", + }, + ] + } + /> </View> <View style={ @@ -1415,13 +1589,15 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` ellipsizeMode="tail" numberOfLines={1} style={ - Object { - "color": "#444", - "flex": 1, - "fontSize": 18, - "fontWeight": "bold", - "marginRight": 8, - } + Array [ + Object { + "color": "#444", + "flex": 1, + "fontSize": 18, + "marginRight": 8, + }, + undefined, + ] } > Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's 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 @@ -1446,10 +1622,10 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` <View style={ Object { - "alignItems": "center", + "alignItems": "flex-end", "flex": 1, "flexDirection": "row", - "justifyContent": "center", + "justifyContent": "flex-end", "width": "100%", } } @@ -1511,7 +1687,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` style={ Array [ Object { - "alignItems": "flex-start", + "alignItems": "center", "borderBottomColor": "#ddd", "borderBottomWidth": 0.5, "flexDirection": "row", @@ -1528,13 +1704,12 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` Object { "alignItems": "center", "justifyContent": "center", - "overflow": "hidden", }, Object { "backgroundColor": "#E91E63", "borderRadius": 4, - "height": 56, - "width": 56, + "height": 46, + "width": 46, }, undefined, ] @@ -1550,7 +1725,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28, + "fontSize": 23, }, ] } @@ -1558,6 +1733,27 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` W </Text> + <View + style={ + Array [ + Object { + "borderRadius": 16, + "height": 16, + "width": 16, + }, + Object { + "borderColor": "#fff", + "borderWidth": 3, + "bottom": -3, + "position": "absolute", + "right": -3, + }, + Object { + "backgroundColor": "#cbced1", + }, + ] + } + /> </View> <View style={ @@ -1586,13 +1782,15 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` ellipsizeMode="tail" numberOfLines={1} style={ - Object { - "color": "#444", - "flex": 1, - "fontSize": 18, - "fontWeight": "bold", - "marginRight": 8, - } + Array [ + Object { + "color": "#444", + "flex": 1, + "fontSize": 18, + "marginRight": 8, + }, + undefined, + ] } > W @@ -1617,10 +1815,10 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` <View style={ Object { - "alignItems": "center", + "alignItems": "flex-end", "flex": 1, "flexDirection": "row", - "justifyContent": "center", + "justifyContent": "flex-end", "width": "100%", } } @@ -1659,7 +1857,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` style={ Array [ Object { - "alignItems": "flex-start", + "alignItems": "center", "borderBottomColor": "#ddd", "borderBottomWidth": 0.5, "flexDirection": "row", @@ -1676,13 +1874,12 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` Object { "alignItems": "center", "justifyContent": "center", - "overflow": "hidden", }, Object { "backgroundColor": "#9C27B0", "borderRadius": 4, - "height": 56, - "width": 56, + "height": 46, + "width": 46, }, undefined, ] @@ -1698,7 +1895,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28, + "fontSize": 23, }, ] } @@ -1706,6 +1903,27 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` WW </Text> + <View + style={ + Array [ + Object { + "borderRadius": 16, + "height": 16, + "width": 16, + }, + Object { + "borderColor": "#fff", + "borderWidth": 3, + "bottom": -3, + "position": "absolute", + "right": -3, + }, + Object { + "backgroundColor": "#cbced1", + }, + ] + } + /> </View> <View style={ @@ -1734,13 +1952,15 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` ellipsizeMode="tail" numberOfLines={1} style={ - Object { - "color": "#444", - "flex": 1, - "fontSize": 18, - "fontWeight": "bold", - "marginRight": 8, - } + Array [ + Object { + "color": "#444", + "flex": 1, + "fontSize": 18, + "marginRight": 8, + }, + undefined, + ] } > WW @@ -1765,10 +1985,10 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` <View style={ Object { - "alignItems": "center", + "alignItems": "flex-end", "flex": 1, "flexDirection": "row", - "justifyContent": "center", + "justifyContent": "flex-end", "width": "100%", } } @@ -1807,7 +2027,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` style={ Array [ Object { - "alignItems": "flex-start", + "alignItems": "center", "borderBottomColor": "#ddd", "borderBottomWidth": 0.5, "flexDirection": "row", @@ -1824,13 +2044,12 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` Object { "alignItems": "center", "justifyContent": "center", - "overflow": "hidden", }, Object { "backgroundColor": undefined, "borderRadius": 4, - "height": 56, - "width": 56, + "height": 46, + "width": 46, }, undefined, ] @@ -1846,7 +2065,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28, + "fontSize": 23, }, ] } @@ -1854,6 +2073,27 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` </Text> + <View + style={ + Array [ + Object { + "borderRadius": 16, + "height": 16, + "width": 16, + }, + Object { + "borderColor": "#fff", + "borderWidth": 3, + "bottom": -3, + "position": "absolute", + "right": -3, + }, + Object { + "backgroundColor": "#cbced1", + }, + ] + } + /> </View> <View style={ @@ -1882,13 +2122,15 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` ellipsizeMode="tail" numberOfLines={1} style={ - Object { - "color": "#444", - "flex": 1, - "fontSize": 18, - "fontWeight": "bold", - "marginRight": 8, - } + Array [ + Object { + "color": "#444", + "flex": 1, + "fontSize": 18, + "marginRight": 8, + }, + undefined, + ] } > @@ -1913,10 +2155,10 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` <View style={ Object { - "alignItems": "center", + "alignItems": "flex-end", "flex": 1, "flexDirection": "row", - "justifyContent": "center", + "justifyContent": "flex-end", "width": "100%", } } diff --git a/app/containers/status.js b/app/containers/status.js index d1351a276..297fa2c28 100644 --- a/app/containers/status.js +++ b/app/containers/status.js @@ -30,7 +30,7 @@ export default class Status extends React.Component { get status() { const userId = this.props.id; - return this.props.activeUsers[userId] || 'offline'; + return this.props.activeUsers && this.props.activeUsers[userId] || 'offline'; } render() { diff --git a/app/presentation/RoomItem.js b/app/presentation/RoomItem.js index 7bd7d08a5..b39a0cb68 100644 --- a/app/presentation/RoomItem.js +++ b/app/presentation/RoomItem.js @@ -143,7 +143,7 @@ const renderNumber = (unread, userMentions) => { }; @connect(state => ({ - user: state.login.user, + user: state.login && state.login.user, StoreLastMessage: state.settings.Store_Last_Message, customEmojis: state.customEmojis }))