diff --git a/__tests__/__snapshots__/RoomItem.js.snap b/__tests__/__snapshots__/RoomItem.js.snap index c2fcbe4b7..e99a1c503 100644 --- a/__tests__/__snapshots__/RoomItem.js.snap +++ b/__tests__/__snapshots__/RoomItem.js.snap @@ -20,13 +20,10 @@ exports[`render channel 1`] = ` Array [ Object { "alignItems": "center", - "borderBottomColor": "#ddd", - "borderBottomWidth": 0.5, "flexDirection": "row", - "paddingHorizontal": 16, - "paddingVertical": 12, }, undefined, + undefined, ] } > @@ -39,11 +36,13 @@ exports[`render channel 1`] = ` }, Object { "backgroundColor": "#00BCD4", - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, + }, + Object { + "marginHorizontal": 15, }, - undefined, ] } > @@ -55,7 +54,7 @@ exports[`render channel 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28.75, + "fontSize": 30, "fontWeight": "800", }, ] @@ -69,7 +68,6 @@ exports[`render channel 1`] = ` Object { "flex": 1, "height": "100%", - "marginLeft": 16, "marginRight": 4, } } @@ -78,46 +76,46 @@ exports[`render channel 1`] = ` style={ Object { "alignItems": "center", - "flex": 1, "flexDirection": "row", "justifyContent": "center", + "marginTop": 5, "width": "100%", } } > - -  - + /> + + + + + + + @@ -178,13 +216,10 @@ exports[`render no icon 1`] = ` Array [ Object { "alignItems": "center", - "borderBottomColor": "#ddd", - "borderBottomWidth": 0.5, "flexDirection": "row", - "paddingHorizontal": 16, - "paddingVertical": 12, }, undefined, + undefined, ] } > @@ -197,11 +232,13 @@ exports[`render no icon 1`] = ` }, Object { "backgroundColor": "#3F51B5", - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, + }, + Object { + "marginHorizontal": 15, }, - undefined, ] } > @@ -213,7 +250,7 @@ exports[`render no icon 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28.75, + "fontSize": 30, "fontWeight": "800", }, ] @@ -227,7 +264,6 @@ exports[`render no icon 1`] = ` Object { "flex": 1, "height": "100%", - "marginLeft": 16, "marginRight": 4, } } @@ -236,46 +272,46 @@ exports[`render no icon 1`] = ` style={ Object { "alignItems": "center", - "flex": 1, "flexDirection": "row", "justifyContent": "center", + "marginTop": 5, "width": "100%", } } > - - - + /> + + + + + + + @@ -336,13 +412,10 @@ exports[`render private group 1`] = ` Array [ Object { "alignItems": "center", - "borderBottomColor": "#ddd", - "borderBottomWidth": 0.5, "flexDirection": "row", - "paddingHorizontal": 16, - "paddingVertical": 12, }, undefined, + undefined, ] } > @@ -355,11 +428,13 @@ exports[`render private group 1`] = ` }, Object { "backgroundColor": "#FF9800", - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, + }, + Object { + "marginHorizontal": 15, }, - undefined, ] } > @@ -371,7 +446,7 @@ exports[`render private group 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28.75, + "fontSize": 30, "fontWeight": "800", }, ] @@ -385,7 +460,6 @@ exports[`render private group 1`] = ` Object { "flex": 1, "height": "100%", - "marginLeft": 16, "marginRight": 4, } } @@ -394,46 +468,46 @@ exports[`render private group 1`] = ` style={ Object { "alignItems": "center", - "flex": 1, "flexDirection": "row", "justifyContent": "center", + "marginTop": 5, "width": "100%", } } > - - - + /> + + + + + + + @@ -495,13 +609,10 @@ exports[`render unread +999 1`] = ` Array [ Object { "alignItems": "center", - "borderBottomColor": "#ddd", - "borderBottomWidth": 0.5, "flexDirection": "row", - "paddingHorizontal": 16, - "paddingVertical": 12, }, undefined, + undefined, ] } > @@ -514,11 +625,13 @@ exports[`render unread +999 1`] = ` }, Object { "backgroundColor": "#3F51B5", - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, + }, + Object { + "marginHorizontal": 15, }, - undefined, ] } > @@ -530,7 +643,7 @@ exports[`render unread +999 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28.75, + "fontSize": 30, "fontWeight": "800", }, ] @@ -546,9 +659,9 @@ exports[`render unread +999 1`] = ` "position": "absolute", }, Object { - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, }, ], Object { @@ -576,37 +689,12 @@ exports[`render unread +999 1`] = ` } /> - - -  - + /> - 999+ + + + + 999+ + + + + + @@ -735,13 +872,10 @@ exports[`render unread 1`] = ` Array [ Object { "alignItems": "center", - "borderBottomColor": "#ddd", - "borderBottomWidth": 0.5, "flexDirection": "row", - "paddingHorizontal": 16, - "paddingVertical": 12, }, undefined, + undefined, ] } > @@ -754,11 +888,13 @@ exports[`render unread 1`] = ` }, Object { "backgroundColor": "#3F51B5", - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, + }, + Object { + "marginHorizontal": 15, }, - undefined, ] } > @@ -770,7 +906,7 @@ exports[`render unread 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28.75, + "fontSize": 30, "fontWeight": "800", }, ] @@ -786,9 +922,9 @@ exports[`render unread 1`] = ` "position": "absolute", }, Object { - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, }, ], Object { @@ -816,37 +952,12 @@ exports[`render unread 1`] = ` } /> - - -  - + /> - 1 + + + + 1 + + + + + @@ -975,13 +1135,10 @@ exports[`renders correctly 1`] = ` Array [ Object { "alignItems": "center", - "borderBottomColor": "#ddd", - "borderBottomWidth": 0.5, "flexDirection": "row", - "paddingHorizontal": 16, - "paddingVertical": 12, }, undefined, + undefined, ] } > @@ -994,11 +1151,13 @@ exports[`renders correctly 1`] = ` }, Object { "backgroundColor": "#3F51B5", - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, + }, + Object { + "marginHorizontal": 15, }, - undefined, ] } > @@ -1010,7 +1169,7 @@ exports[`renders correctly 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28.75, + "fontSize": 30, "fontWeight": "800", }, ] @@ -1026,9 +1185,9 @@ exports[`renders correctly 1`] = ` "position": "absolute", }, Object { - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, }, ], Object { @@ -1056,37 +1215,12 @@ exports[`renders correctly 1`] = ` } /> - - -  - + /> + + + + + + + diff --git a/__tests__/__snapshots__/Storyshots.test.js.snap b/__tests__/__snapshots__/Storyshots.test.js.snap index 43564cf54..2d8a2d067 100644 --- a/__tests__/__snapshots__/Storyshots.test.js.snap +++ b/__tests__/__snapshots__/Storyshots.test.js.snap @@ -12,7 +12,7 @@ exports[`Storyshots Avatar avatar 1`] = ` }, Object { "backgroundColor": "#3F51B5", - "borderRadius": 2, + "borderRadius": 4, "height": 25, "width": 25, }, @@ -44,7 +44,7 @@ exports[`Storyshots Avatar avatar 1`] = ` "position": "absolute", }, Object { - "borderRadius": 2, + "borderRadius": 4, "height": 25, "width": 25, }, @@ -84,7 +84,7 @@ exports[`Storyshots Avatar avatar 1`] = ` }, Object { "backgroundColor": "#9C27B0", - "borderRadius": 2, + "borderRadius": 4, "height": 40, "width": 40, }, @@ -116,7 +116,7 @@ exports[`Storyshots Avatar avatar 1`] = ` "position": "absolute", }, Object { - "borderRadius": 2, + "borderRadius": 4, "height": 40, "width": 40, }, @@ -156,7 +156,7 @@ exports[`Storyshots Avatar avatar 1`] = ` }, Object { "backgroundColor": "#9C27B0", - "borderRadius": 2, + "borderRadius": 4, "height": 30, "width": 30, }, @@ -188,7 +188,7 @@ exports[`Storyshots Avatar avatar 1`] = ` "position": "absolute", }, Object { - "borderRadius": 2, + "borderRadius": 4, "height": 30, "width": 30, }, @@ -316,13 +316,10 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` Array [ Object { "alignItems": "center", - "borderBottomColor": "#ddd", - "borderBottomWidth": 0.5, "flexDirection": "row", - "paddingHorizontal": 16, - "paddingVertical": 12, }, undefined, + undefined, ] } > @@ -335,11 +332,13 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` }, Object { "backgroundColor": "#8BC34A", - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, + }, + Object { + "marginHorizontal": 15, }, - undefined, ] } > @@ -351,7 +350,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28.75, + "fontSize": 30, "fontWeight": "800", }, ] @@ -367,9 +366,9 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "position": "absolute", }, Object { - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, }, ], Object { @@ -397,37 +396,12 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` } /> - - -  - + /> + + + + + + + @@ -531,13 +548,10 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` Array [ Object { "alignItems": "center", - "borderBottomColor": "#ddd", - "borderBottomWidth": 0.5, "flexDirection": "row", - "paddingHorizontal": 16, - "paddingVertical": 12, }, undefined, + undefined, ] } > @@ -550,11 +564,13 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` }, Object { "backgroundColor": "#8BC34A", - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, + }, + Object { + "marginHorizontal": 15, }, - undefined, ] } > @@ -566,7 +582,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28.75, + "fontSize": 30, "fontWeight": "800", }, ] @@ -582,9 +598,9 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "position": "absolute", }, Object { - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, }, ], Object { @@ -612,37 +628,12 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` } /> - - -  - + /> + + + + + + + @@ -750,13 +784,10 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` Array [ Object { "alignItems": "center", - "borderBottomColor": "#ddd", - "borderBottomWidth": 0.5, "flexDirection": "row", - "paddingHorizontal": 16, - "paddingVertical": 12, }, undefined, + undefined, ] } > @@ -769,11 +800,13 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` }, Object { "backgroundColor": "#8BC34A", - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, + }, + Object { + "marginHorizontal": 15, }, - undefined, ] } > @@ -785,7 +818,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28.75, + "fontSize": 30, "fontWeight": "800", }, ] @@ -801,9 +834,9 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "position": "absolute", }, Object { - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, }, ], Object { @@ -831,37 +864,12 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` } /> - - -  - + /> - 1 + + + + 1 + + + + + @@ -1004,11 +1058,13 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` }, Object { "backgroundColor": "#795548", - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, + }, + Object { + "marginHorizontal": 15, }, - undefined, ] } > @@ -1020,7 +1076,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28.75, + "fontSize": 30, "fontWeight": "800", }, ] @@ -1036,9 +1092,9 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "position": "absolute", }, Object { - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, }, ], Object { @@ -1066,37 +1122,12 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` } /> - - -  - + /> - 9 + + + + 9 + + + + + @@ -1243,11 +1320,13 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` }, Object { "backgroundColor": "#795548", - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, + }, + Object { + "marginHorizontal": 15, }, - undefined, ] } > @@ -1259,7 +1338,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28.75, + "fontSize": 30, "fontWeight": "800", }, ] @@ -1275,9 +1354,9 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "position": "absolute", }, Object { - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, }, ], Object { @@ -1305,37 +1384,12 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` } /> - - -  - + /> - 99 + + + + 99 + + + + + @@ -1478,11 +1578,13 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` }, Object { "backgroundColor": "#795548", - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, + }, + Object { + "marginHorizontal": 15, }, - undefined, ] } > @@ -1494,7 +1596,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28.75, + "fontSize": 30, "fontWeight": "800", }, ] @@ -1510,9 +1612,9 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "position": "absolute", }, Object { - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, }, ], Object { @@ -1540,37 +1642,12 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` } /> - - -  - + /> - 100 + + + + 100 + + + + + @@ -1713,11 +1836,13 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` }, Object { "backgroundColor": "#795548", - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, + }, + Object { + "marginHorizontal": 15, }, - undefined, ] } > @@ -1729,7 +1854,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28.75, + "fontSize": 30, "fontWeight": "800", }, ] @@ -1745,9 +1870,9 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "position": "absolute", }, Object { - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, }, ], Object { @@ -1775,37 +1900,12 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` } /> - - -  - + /> - 999+ + + + + 999+ + + + + + @@ -1948,11 +2094,13 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` }, Object { "backgroundColor": "#795548", - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, + }, + Object { + "marginHorizontal": 15, }, - undefined, ] } > @@ -1964,7 +2112,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28.75, + "fontSize": 30, "fontWeight": "800", }, ] @@ -1980,9 +2128,9 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "position": "absolute", }, Object { - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, }, ], Object { @@ -2010,37 +2158,12 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` } /> - - -  - + /> - @ 999+ + + + + @ 999+ + + + + + @@ -2183,11 +2352,13 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` }, Object { "backgroundColor": "#E91E63", - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, + }, + Object { + "marginHorizontal": 15, }, - undefined, ] } > @@ -2199,7 +2370,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28.75, + "fontSize": 30, "fontWeight": "800", }, ] @@ -2215,9 +2386,9 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "position": "absolute", }, Object { - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, }, ], Object { @@ -2245,37 +2416,12 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` } /> - - -  - + /> + + + + + + + @@ -2379,13 +2568,10 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` Array [ Object { "alignItems": "center", - "borderBottomColor": "#ddd", - "borderBottomWidth": 0.5, "flexDirection": "row", - "paddingHorizontal": 16, - "paddingVertical": 12, }, undefined, + undefined, ] } > @@ -2398,11 +2584,13 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` }, Object { "backgroundColor": "#9C27B0", - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, + }, + Object { + "marginHorizontal": 15, }, - undefined, ] } > @@ -2414,7 +2602,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28.75, + "fontSize": 30, "fontWeight": "800", }, ] @@ -2430,9 +2618,9 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "position": "absolute", }, Object { - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, }, ], Object { @@ -2460,37 +2648,12 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` } /> - - -  - + /> + + + + + + + @@ -2594,13 +2800,10 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` Array [ Object { "alignItems": "center", - "borderBottomColor": "#ddd", - "borderBottomWidth": 0.5, "flexDirection": "row", - "paddingHorizontal": 16, - "paddingVertical": 12, }, undefined, + undefined, ] } > @@ -2613,11 +2816,13 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` }, Object { "backgroundColor": undefined, - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, + }, + Object { + "marginHorizontal": 15, }, - undefined, ] } > @@ -2629,7 +2834,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "color": "#ffffff", }, Object { - "fontSize": 28.75, + "fontSize": 30, "fontWeight": "800", }, ] @@ -2645,9 +2850,9 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` "position": "absolute", }, Object { - "borderRadius": 2, - "height": 46, - "width": 46, + "borderRadius": 4, + "height": 48, + "width": 48, }, ], Object { @@ -2675,37 +2880,12 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = ` } /> - - -  - + /> + + + + + + + diff --git a/android/app/build.gradle b/android/app/build.gradle index 56fdfe8bb..6cdb6551b 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -201,7 +201,7 @@ dependencies { implementation project(':reactnativenotifications') implementation fileTree(dir: "libs", include: ["*.jar"]) implementation "com.android.support:appcompat-v7:27.1.0" - implementation "com.android.support:support-v4:27.1.0" + implementation "com.android.support:support-v4:27.1.+" implementation 'com.android.support:customtabs:27.1.0' implementation 'com.android.support:design:27.1.0' implementation "com.facebook.react:react-native:+" // From node_modules diff --git a/android/app/src/main/res/drawable-hdpi/back.png b/android/app/src/main/res/drawable-hdpi/back.png new file mode 100644 index 000000000..581100a68 Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/back.png differ diff --git a/android/app/src/main/res/drawable-hdpi/check.png b/android/app/src/main/res/drawable-hdpi/check.png new file mode 100644 index 000000000..8c00ca8c9 Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/check.png differ diff --git a/android/app/src/main/res/drawable-hdpi/disclosure_indicator.png b/android/app/src/main/res/drawable-hdpi/disclosure_indicator.png new file mode 100644 index 000000000..9f6fd1dab Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/disclosure_indicator.png differ diff --git a/android/app/src/main/res/drawable-hdpi/disclosure_indicator_server.png b/android/app/src/main/res/drawable-hdpi/disclosure_indicator_server.png new file mode 100644 index 000000000..287976ba3 Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/disclosure_indicator_server.png differ diff --git a/android/app/src/main/res/drawable-hdpi/group_favorites.png b/android/app/src/main/res/drawable-hdpi/group_favorites.png new file mode 100644 index 000000000..bebd96c40 Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/group_favorites.png differ diff --git a/android/app/src/main/res/drawable-hdpi/group_type.png b/android/app/src/main/res/drawable-hdpi/group_type.png new file mode 100644 index 000000000..2018ed7de Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/group_type.png differ diff --git a/android/app/src/main/res/drawable-hdpi/group_unread.png b/android/app/src/main/res/drawable-hdpi/group_unread.png new file mode 100644 index 000000000..1e191b203 Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/group_unread.png differ diff --git a/android/app/src/main/res/drawable-hdpi/launch_screen.png b/android/app/src/main/res/drawable-hdpi/launch_screen.png deleted file mode 100644 index f2dee7926..000000000 Binary files a/android/app/src/main/res/drawable-hdpi/launch_screen.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-hdpi/logo.png b/android/app/src/main/res/drawable-hdpi/logo.png new file mode 100644 index 000000000..4a98ac064 Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/logo.png differ diff --git a/android/app/src/main/res/drawable-hdpi/new_channel.png b/android/app/src/main/res/drawable-hdpi/new_channel.png new file mode 100644 index 000000000..707f021cb Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/new_channel.png differ diff --git a/android/app/src/main/res/drawable-hdpi/search.png b/android/app/src/main/res/drawable-hdpi/search.png new file mode 100644 index 000000000..659955826 Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/search.png differ diff --git a/android/app/src/main/res/drawable-hdpi/settings.png b/android/app/src/main/res/drawable-hdpi/settings.png new file mode 100644 index 000000000..d537c71bb Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/settings.png differ diff --git a/android/app/src/main/res/drawable-hdpi/sort_activity.png b/android/app/src/main/res/drawable-hdpi/sort_activity.png new file mode 100644 index 000000000..2be5be129 Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/sort_activity.png differ diff --git a/android/app/src/main/res/drawable-hdpi/sort_alphabetically.png b/android/app/src/main/res/drawable-hdpi/sort_alphabetically.png new file mode 100644 index 000000000..8fee9c2a1 Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/sort_alphabetically.png differ diff --git a/android/app/src/main/res/drawable-hdpi/subscription_hashtag.png b/android/app/src/main/res/drawable-hdpi/subscription_hashtag.png new file mode 100644 index 000000000..76cf0a341 Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/subscription_hashtag.png differ diff --git a/android/app/src/main/res/drawable-hdpi/subscription_lock.png b/android/app/src/main/res/drawable-hdpi/subscription_lock.png new file mode 100644 index 000000000..71ec74626 Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/subscription_lock.png differ diff --git a/android/app/src/main/res/drawable-mdpi/app_images_logo.png b/android/app/src/main/res/drawable-mdpi/app_images_logo.png deleted file mode 100644 index 57a423a6b..000000000 Binary files a/android/app/src/main/res/drawable-mdpi/app_images_logo.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-mdpi/back.png b/android/app/src/main/res/drawable-mdpi/back.png new file mode 100644 index 000000000..f4e8e91fd Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/back.png differ diff --git a/android/app/src/main/res/drawable-mdpi/check.png b/android/app/src/main/res/drawable-mdpi/check.png new file mode 100644 index 000000000..b02785007 Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/check.png differ diff --git a/android/app/src/main/res/drawable-mdpi/disclosure_indicator.png b/android/app/src/main/res/drawable-mdpi/disclosure_indicator.png new file mode 100644 index 000000000..42caa0676 Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/disclosure_indicator.png differ diff --git a/android/app/src/main/res/drawable-mdpi/disclosure_indicator_server.png b/android/app/src/main/res/drawable-mdpi/disclosure_indicator_server.png new file mode 100644 index 000000000..87923b2fc Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/disclosure_indicator_server.png differ diff --git a/android/app/src/main/res/drawable-mdpi/group_favorites.png b/android/app/src/main/res/drawable-mdpi/group_favorites.png new file mode 100644 index 000000000..d139ea4d1 Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/group_favorites.png differ diff --git a/android/app/src/main/res/drawable-mdpi/group_type.png b/android/app/src/main/res/drawable-mdpi/group_type.png new file mode 100644 index 000000000..f1be38bce Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/group_type.png differ diff --git a/android/app/src/main/res/drawable-mdpi/group_unread.png b/android/app/src/main/res/drawable-mdpi/group_unread.png new file mode 100644 index 000000000..5ea6d0f34 Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/group_unread.png differ diff --git a/android/app/src/main/res/drawable-mdpi/launch_screen.png b/android/app/src/main/res/drawable-mdpi/launch_screen.png deleted file mode 100644 index 1b7967402..000000000 Binary files a/android/app/src/main/res/drawable-mdpi/launch_screen.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-mdpi/logo.png b/android/app/src/main/res/drawable-mdpi/logo.png new file mode 100644 index 000000000..6928d7b88 Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/logo.png differ diff --git a/android/app/src/main/res/drawable-mdpi/new_channel.png b/android/app/src/main/res/drawable-mdpi/new_channel.png new file mode 100644 index 000000000..62d1ce59c Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/new_channel.png differ diff --git a/android/app/src/main/res/drawable-mdpi/search.png b/android/app/src/main/res/drawable-mdpi/search.png new file mode 100644 index 000000000..8482814be Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/search.png differ diff --git a/android/app/src/main/res/drawable-mdpi/settings.png b/android/app/src/main/res/drawable-mdpi/settings.png new file mode 100644 index 000000000..912ab9621 Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/settings.png differ diff --git a/android/app/src/main/res/drawable-mdpi/sort_activity.png b/android/app/src/main/res/drawable-mdpi/sort_activity.png new file mode 100644 index 000000000..e64f442e5 Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/sort_activity.png differ diff --git a/android/app/src/main/res/drawable-mdpi/sort_alphabetically.png b/android/app/src/main/res/drawable-mdpi/sort_alphabetically.png new file mode 100644 index 000000000..362ad237a Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/sort_alphabetically.png differ diff --git a/android/app/src/main/res/drawable-mdpi/subscription_hashtag.png b/android/app/src/main/res/drawable-mdpi/subscription_hashtag.png new file mode 100644 index 000000000..d3719dada Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/subscription_hashtag.png differ diff --git a/android/app/src/main/res/drawable-mdpi/subscription_lock.png b/android/app/src/main/res/drawable-mdpi/subscription_lock.png new file mode 100644 index 000000000..e345bfdd6 Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/subscription_lock.png differ diff --git a/android/app/src/main/res/drawable-xhdpi/back.png b/android/app/src/main/res/drawable-xhdpi/back.png new file mode 100644 index 000000000..5485fab8b Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/back.png differ diff --git a/android/app/src/main/res/drawable-xhdpi/check.png b/android/app/src/main/res/drawable-xhdpi/check.png new file mode 100644 index 000000000..6f20b37a3 Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/check.png differ diff --git a/android/app/src/main/res/drawable-xhdpi/disclosure_indicator.png b/android/app/src/main/res/drawable-xhdpi/disclosure_indicator.png new file mode 100644 index 000000000..585d4a797 Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/disclosure_indicator.png differ diff --git a/android/app/src/main/res/drawable-xhdpi/disclosure_indicator_server.png b/android/app/src/main/res/drawable-xhdpi/disclosure_indicator_server.png new file mode 100644 index 000000000..bed48962f Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/disclosure_indicator_server.png differ diff --git a/android/app/src/main/res/drawable-xhdpi/group_favorites.png b/android/app/src/main/res/drawable-xhdpi/group_favorites.png new file mode 100644 index 000000000..359973c8c Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/group_favorites.png differ diff --git a/android/app/src/main/res/drawable-xhdpi/group_type.png b/android/app/src/main/res/drawable-xhdpi/group_type.png new file mode 100644 index 000000000..c0acc012d Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/group_type.png differ diff --git a/android/app/src/main/res/drawable-xhdpi/group_unread.png b/android/app/src/main/res/drawable-xhdpi/group_unread.png new file mode 100644 index 000000000..899c2863b Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/group_unread.png differ diff --git a/android/app/src/main/res/drawable-xhdpi/launch_screen.png b/android/app/src/main/res/drawable-xhdpi/launch_screen.png deleted file mode 100644 index 1c0eef013..000000000 Binary files a/android/app/src/main/res/drawable-xhdpi/launch_screen.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-xhdpi/logo.png b/android/app/src/main/res/drawable-xhdpi/logo.png new file mode 100644 index 000000000..e4502f69c Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/logo.png differ diff --git a/android/app/src/main/res/drawable-xhdpi/new_channel.png b/android/app/src/main/res/drawable-xhdpi/new_channel.png new file mode 100644 index 000000000..14da67695 Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/new_channel.png differ diff --git a/android/app/src/main/res/drawable-xhdpi/search.png b/android/app/src/main/res/drawable-xhdpi/search.png new file mode 100644 index 000000000..a2966e0c3 Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/search.png differ diff --git a/android/app/src/main/res/drawable-xhdpi/settings.png b/android/app/src/main/res/drawable-xhdpi/settings.png new file mode 100644 index 000000000..1dd8592d0 Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/settings.png differ diff --git a/android/app/src/main/res/drawable-xhdpi/sort_activity.png b/android/app/src/main/res/drawable-xhdpi/sort_activity.png new file mode 100644 index 000000000..533d1aa63 Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/sort_activity.png differ diff --git a/android/app/src/main/res/drawable-xhdpi/sort_alphabetically.png b/android/app/src/main/res/drawable-xhdpi/sort_alphabetically.png new file mode 100644 index 000000000..367563110 Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/sort_alphabetically.png differ diff --git a/android/app/src/main/res/drawable-xhdpi/subscription_hashtag.png b/android/app/src/main/res/drawable-xhdpi/subscription_hashtag.png new file mode 100644 index 000000000..e4a79ec30 Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/subscription_hashtag.png differ diff --git a/android/app/src/main/res/drawable-xhdpi/subscription_lock.png b/android/app/src/main/res/drawable-xhdpi/subscription_lock.png new file mode 100644 index 000000000..a87c44950 Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/subscription_lock.png differ diff --git a/android/app/src/main/res/drawable-xxhdpi/back.png b/android/app/src/main/res/drawable-xxhdpi/back.png new file mode 100644 index 000000000..8459f0d61 Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/back.png differ diff --git a/android/app/src/main/res/drawable-xxhdpi/check.png b/android/app/src/main/res/drawable-xxhdpi/check.png new file mode 100644 index 000000000..83186d0b9 Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/check.png differ diff --git a/android/app/src/main/res/drawable-xxhdpi/disclosure_indicator.png b/android/app/src/main/res/drawable-xxhdpi/disclosure_indicator.png new file mode 100644 index 000000000..3c8634648 Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/disclosure_indicator.png differ diff --git a/android/app/src/main/res/drawable-xxhdpi/disclosure_indicator_server.png b/android/app/src/main/res/drawable-xxhdpi/disclosure_indicator_server.png new file mode 100644 index 000000000..c0f6074d6 Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/disclosure_indicator_server.png differ diff --git a/android/app/src/main/res/drawable-xxhdpi/group_favorites.png b/android/app/src/main/res/drawable-xxhdpi/group_favorites.png new file mode 100644 index 000000000..748eadccf Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/group_favorites.png differ diff --git a/android/app/src/main/res/drawable-xxhdpi/group_type.png b/android/app/src/main/res/drawable-xxhdpi/group_type.png new file mode 100644 index 000000000..d92d228dd Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/group_type.png differ diff --git a/android/app/src/main/res/drawable-xxhdpi/group_unread.png b/android/app/src/main/res/drawable-xxhdpi/group_unread.png new file mode 100644 index 000000000..e84f81f65 Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/group_unread.png differ diff --git a/android/app/src/main/res/drawable-xxhdpi/launch_screen.png b/android/app/src/main/res/drawable-xxhdpi/launch_screen.png deleted file mode 100644 index b9a85b34b..000000000 Binary files a/android/app/src/main/res/drawable-xxhdpi/launch_screen.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-xxhdpi/logo.png b/android/app/src/main/res/drawable-xxhdpi/logo.png new file mode 100644 index 000000000..159d7d4a5 Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/logo.png differ diff --git a/android/app/src/main/res/drawable-xxhdpi/new_channel.png b/android/app/src/main/res/drawable-xxhdpi/new_channel.png new file mode 100644 index 000000000..82d882eaa Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/new_channel.png differ diff --git a/android/app/src/main/res/drawable-xxhdpi/search.png b/android/app/src/main/res/drawable-xxhdpi/search.png new file mode 100644 index 000000000..1d380f019 Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/search.png differ diff --git a/android/app/src/main/res/drawable-xxhdpi/settings.png b/android/app/src/main/res/drawable-xxhdpi/settings.png new file mode 100644 index 000000000..501b6a4b4 Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/settings.png differ diff --git a/android/app/src/main/res/drawable-xxhdpi/sort_activity.png b/android/app/src/main/res/drawable-xxhdpi/sort_activity.png new file mode 100644 index 000000000..dac1d40e8 Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/sort_activity.png differ diff --git a/android/app/src/main/res/drawable-xxhdpi/sort_alphabetically.png b/android/app/src/main/res/drawable-xxhdpi/sort_alphabetically.png new file mode 100644 index 000000000..2da108f0c Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/sort_alphabetically.png differ diff --git a/android/app/src/main/res/drawable-xxhdpi/subscription_hashtag.png b/android/app/src/main/res/drawable-xxhdpi/subscription_hashtag.png new file mode 100644 index 000000000..5d4be58c7 Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/subscription_hashtag.png differ diff --git a/android/app/src/main/res/drawable-xxhdpi/subscription_lock.png b/android/app/src/main/res/drawable-xxhdpi/subscription_lock.png new file mode 100644 index 000000000..68537368f Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/subscription_lock.png differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/back.png b/android/app/src/main/res/drawable-xxxhdpi/back.png new file mode 100644 index 000000000..8278d1b38 Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/back.png differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/check.png b/android/app/src/main/res/drawable-xxxhdpi/check.png new file mode 100644 index 000000000..94fcdd0eb Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/check.png differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/disclosure_indicator.png b/android/app/src/main/res/drawable-xxxhdpi/disclosure_indicator.png new file mode 100644 index 000000000..d9a8f9079 Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/disclosure_indicator.png differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/disclosure_indicator_server.png b/android/app/src/main/res/drawable-xxxhdpi/disclosure_indicator_server.png new file mode 100644 index 000000000..fa6f1db55 Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/disclosure_indicator_server.png differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/group_favorites.png b/android/app/src/main/res/drawable-xxxhdpi/group_favorites.png new file mode 100644 index 000000000..111ff514c Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/group_favorites.png differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/group_type.png b/android/app/src/main/res/drawable-xxxhdpi/group_type.png new file mode 100644 index 000000000..20f077276 Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/group_type.png differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/group_unread.png b/android/app/src/main/res/drawable-xxxhdpi/group_unread.png new file mode 100644 index 000000000..f2e41f0b1 Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/group_unread.png differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/launch_screen.png b/android/app/src/main/res/drawable-xxxhdpi/launch_screen.png deleted file mode 100644 index 603e7c1fa..000000000 Binary files a/android/app/src/main/res/drawable-xxxhdpi/launch_screen.png and /dev/null differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/logo.png b/android/app/src/main/res/drawable-xxxhdpi/logo.png new file mode 100644 index 000000000..c1bd0fe37 Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/logo.png differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/new_channel.png b/android/app/src/main/res/drawable-xxxhdpi/new_channel.png new file mode 100644 index 000000000..7086e7134 Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/new_channel.png differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/search.png b/android/app/src/main/res/drawable-xxxhdpi/search.png new file mode 100644 index 000000000..16e8b3b52 Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/search.png differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/settings.png b/android/app/src/main/res/drawable-xxxhdpi/settings.png new file mode 100644 index 000000000..cca523a1b Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/settings.png differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/sort_activity.png b/android/app/src/main/res/drawable-xxxhdpi/sort_activity.png new file mode 100644 index 000000000..1a8c76129 Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/sort_activity.png differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/sort_alphabetically.png b/android/app/src/main/res/drawable-xxxhdpi/sort_alphabetically.png new file mode 100644 index 000000000..db4dbc58b Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/sort_alphabetically.png differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/subscription_hashtag.png b/android/app/src/main/res/drawable-xxxhdpi/subscription_hashtag.png new file mode 100644 index 000000000..d76738e3a Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/subscription_hashtag.png differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/subscription_lock.png b/android/app/src/main/res/drawable-xxxhdpi/subscription_lock.png new file mode 100644 index 000000000..ba072523b Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/subscription_lock.png differ diff --git a/app/actions/actionsTypes.js b/app/actions/actionsTypes.js index eb56da9e5..49bd9cea5 100644 --- a/app/actions/actionsTypes.js +++ b/app/actions/actionsTypes.js @@ -24,14 +24,22 @@ export const LOGIN = createRequestTypes('LOGIN', [ 'OPEN', 'CLOSE', 'SET_SERVICES', - 'REMOVE_SERVICES' + 'REMOVE_SERVICES', + 'SET_PREFERENCE' ]); export const FORGOT_PASSWORD = createRequestTypes('FORGOT_PASSWORD', [ ...defaultTypes, 'INIT' ]); export const USER = createRequestTypes('USER', ['SET']); -export const ROOMS = createRequestTypes('ROOMS', [...defaultTypes, 'SET_SEARCH']); +export const ROOMS = createRequestTypes('ROOMS', [ + ...defaultTypes, + 'SET_SEARCH', + 'CLOSE_SERVER_DROPDOWN', + 'TOGGLE_SERVER_DROPDOWN', + 'CLOSE_SORT_DROPDOWN', + 'TOGGLE_SORT_DROPDOWN' +]); export const ROOM = createRequestTypes('ROOM', [ 'ADD_USER_TYPING', 'REMOVE_USER_TYPING', diff --git a/app/actions/login.js b/app/actions/login.js index e9e332b36..529039ce4 100644 --- a/app/actions/login.js +++ b/app/actions/login.js @@ -151,3 +151,10 @@ export function removeLoginServices() { type: types.LOGIN.REMOVE_SERVICES }; } + +export function setPreference(preference) { + return { + type: types.LOGIN.SET_PREFERENCE, + preference + }; +} diff --git a/app/actions/rooms.js b/app/actions/rooms.js index 1555a8c85..84308ef99 100644 --- a/app/actions/rooms.js +++ b/app/actions/rooms.js @@ -26,3 +26,27 @@ export function setSearch(searchText) { searchText }; } + +export function closeServerDropdown() { + return { + type: types.ROOMS.CLOSE_SERVER_DROPDOWN + }; +} + +export function toggleServerDropdown() { + return { + type: types.ROOMS.TOGGLE_SERVER_DROPDOWN + }; +} + +export function closeSortDropdown() { + return { + type: types.ROOMS.CLOSE_SORT_DROPDOWN + }; +} + +export function toggleSortDropdown() { + return { + type: types.ROOMS.TOGGLE_SORT_DROPDOWN + }; +} diff --git a/app/constants/settings.js b/app/constants/settings.js index 048aa00d4..7206e0ecb 100644 --- a/app/constants/settings.js +++ b/app/constants/settings.js @@ -71,6 +71,9 @@ export default { Message_TimeFormat: { type: 'valueAsString' }, + Site_Name: { + type: 'valueAsString' + }, Site_Url: { type: 'valueAsString' }, diff --git a/app/containers/Avatar.js b/app/containers/Avatar.js index b25d0f7a5..cf357c2b2 100644 --- a/app/containers/Avatar.js +++ b/app/containers/Avatar.js @@ -38,7 +38,7 @@ export default class Avatar extends React.PureComponent { text: '', size: 25, type: 'd', - borderRadius: 2, + borderRadius: 4, forceInitials: false }; state = { showInitials: true }; diff --git a/app/containers/RoomTypeIcon.js b/app/containers/RoomTypeIcon.js index 269d42940..0d843eef7 100644 --- a/app/containers/RoomTypeIcon.js +++ b/app/containers/RoomTypeIcon.js @@ -1,36 +1,33 @@ import React from 'react'; -import { StyleSheet } from 'react-native'; +import { Image, StyleSheet } from 'react-native'; import PropTypes from 'prop-types'; -import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; const styles = StyleSheet.create({ - type: { - marginRight: 5, + style: { + marginRight: 7, marginTop: 3 } }); -const RoomTypeIcon = ({ type, size }) => { +const RoomTypeIcon = ({ type, size, style }) => { if (!type) { return null; } - const icon = { - c: 'pound', - p: 'lock', - l: 'account', - d: 'at' - }[type]; - return ; + if (type === 'c') { + return ; + } + return ; }; RoomTypeIcon.propTypes = { type: PropTypes.string, - size: PropTypes.number + size: PropTypes.number, + style: PropTypes.object }; RoomTypeIcon.defaultProps = { - size: 15 + size: 10 }; export default RoomTypeIcon; diff --git a/app/containers/message/Markdown.js b/app/containers/message/Markdown.js index 29d7e4f79..da54d141c 100644 --- a/app/containers/message/Markdown.js +++ b/app/containers/message/Markdown.js @@ -68,7 +68,6 @@ export default class Markdown extends React.Component { hardbreak: () => null, blocklink: () => null, image: node => ( - // TODO: should use Image component ), ...rules diff --git a/app/i18n/locales/en.js b/app/i18n/locales/en.js index cdb64afec..442614790 100644 --- a/app/i18n/locales/en.js +++ b/app/i18n/locales/en.js @@ -76,6 +76,8 @@ export default { 'error-user-registration-secret': 'User registration is only allowed via Secret URL', 'error-you-are-last-owner': 'You are the last owner. Please set new owner before leaving the room.', Actions: 'Actions', + activity: 'activity', + Activity: 'Activity', Add_Reaction: 'Add Reaction', Add_Server: 'Add Server', Add_user: 'Add user', @@ -85,6 +87,7 @@ export default { All_users_in_the_channel_can_write_new_messages: 'All users in the channel can write new messages', All: 'All', Allow_Reactions: 'Allow Reactions', + Alphabetical: 'Alphabetical', and_more: 'and more', and: 'and', announcement: 'announcement', @@ -108,6 +111,7 @@ export default { Cancel: 'Cancel', changing_avatar: 'changing avatar', Channel_Name: 'Channel Name', + Channels: 'Channels', Chats: 'Chats', Close: 'Close', Close_emoji_selector: 'Close emoji selector', @@ -133,6 +137,7 @@ export default { description: 'description', Description: 'Description', Disable_notifications: 'Disable notifications', + Direct_Messages: 'Direct Messages', Do_you_really_want_to_key_this_room_question_mark: 'Do you really want to {{key}} this room?', edit: 'edit', Edit: 'Edit', @@ -141,6 +146,7 @@ export default { Enable_notifications: 'Enable notifications', Everyone_can_access_this_channel: 'Everyone can access this channel', Error_uploading: 'Error uploading', + Favorites: 'Favorites', Files: 'Files', Finish_recording: 'Finish recording', For_your_security_you_must_enter_your_current_password_to_continue: 'For your security, you must enter your current password to continue', @@ -148,6 +154,8 @@ export default { Forgot_password_If_this_email_is_registered: 'If this email is registered, we\'ll send instructions on how to reset your password. If you do not receive an email shortly, please come back and try again.', Forgot_password: 'Forgot password', Forgot_Password: 'Forgot Password', + Group_by_favorites: 'Group by favorites', + Group_by_type: 'Group by type', Has_joined_the_channel: 'Has joined the channel', Has_left_the_channel: 'Has left the channel', I_have_an_account: 'I have an account', @@ -161,6 +169,7 @@ export default { last_message: 'last message', Leave_channel: 'Leave channel', leave: 'leave', + Livechat: 'Livechat', Loading_messages_ellipsis: 'Loading messages...', Login: 'Login', Logout: 'Logout', @@ -180,6 +189,7 @@ export default { My_servers: 'My servers', N_online_members: '{{n}} online members', N_person_reacted: '{{n}} people reacted', + name: 'name', Name: 'Name', New_in_RocketChat_question_mark: 'New in Rocket.Chat?', New_Message: 'New Message', @@ -216,6 +226,7 @@ export default { Preferences_saved: 'Preferences saved!', Privacy_Policy: ' Privacy Policy', Private_Channel: 'Private Channel', + Private_Groups: 'Private Groups', Private: 'Private', Profile_saved_successfully: 'Profile saved successfully!', Profile: 'Profile', @@ -257,6 +268,7 @@ export default { Send: 'Send', Send_audio_message: 'Send audio message', Send_message: 'Send message', + Server: 'Server', Servers: 'Servers', Settings: 'Settings', Settings_succesfully_changed: 'Settings succesfully changed!', @@ -268,6 +280,7 @@ export default { snippeted: 'snippeted', Snippets: 'Snippets', Some_field_is_invalid_or_empty: 'Some field is invalid or empty', + Sorting_by: 'Sorting by {{key}}', Star_room: 'Star room', Star: 'Star', Starred_Messages: 'Starred Messages', @@ -296,6 +309,8 @@ export default { unmuted: 'unmuted', Unpin: 'Unpin', unread_messages: 'unread messages', + Unread: 'Unread', + Unread_on_top: 'Unread on top', Unstar: 'Unstar', Uploading: 'Uploading', User_added_by: 'User {{userAdded}} added by {{userBy}}', diff --git a/app/lib/methods/getSettings.js b/app/lib/methods/getSettings.js index ae4fc63e7..f1ec9c5ff 100644 --- a/app/lib/methods/getSettings.js +++ b/app/lib/methods/getSettings.js @@ -11,18 +11,36 @@ const getLastUpdate = () => { return setting && setting._updatedAt; }; +function updateServer(param) { + database.databases.serversDB.write(() => { + database.databases.serversDB.create('servers', { id: this.ddp.url, ...param }, true); + }); +} + export default async function() { try { const lastUpdate = getLastUpdate(); const result = await (!lastUpdate ? this.ddp.call('public-settings/get') : this.ddp.call('public-settings/get', new Date(lastUpdate))); + const data = result.update || result || []; - const filteredSettings = this._prepareSettings(this._filterSettings(result.update || result)); + const filteredSettings = this._prepareSettings(this._filterSettings(data)); InteractionManager.runAfterInteractions(() => database.write(() => - filteredSettings.forEach(setting => - database.create('settings', { ...setting, _updatedAt: new Date() }, true)))); + filteredSettings.forEach((setting) => { + database.create('settings', { ...setting, _updatedAt: new Date() }, true); + + if (setting._id === 'Site_Name') { + updateServer.call(this, { name: setting.valueAsString }); + } + }))); reduxStore.dispatch(actions.addSettings(this.parseSettings(filteredSettings))); + + const iconSetting = data.find(item => item._id === 'Assets_favicon_512'); + if (iconSetting) { + const iconURL = `${ this.ddp.url }/${ iconSetting.value.url || iconSetting.value.defaultUrl }`; + updateServer.call(this, { iconURL }); + } } catch (e) { log('getSettings', e); } diff --git a/app/lib/realm.js b/app/lib/realm.js index f4677b030..e4f68f40e 100644 --- a/app/lib/realm.js +++ b/app/lib/realm.js @@ -9,6 +9,8 @@ const serversSchema = { primaryKey: 'id', properties: { id: 'string', + name: { type: 'string', optional: true }, + iconURL: { type: 'string', optional: true }, current: 'bool' } }; diff --git a/app/lib/rocketchat.js b/app/lib/rocketchat.js index fa792cfa6..ed2b02897 100644 --- a/app/lib/rocketchat.js +++ b/app/lib/rocketchat.js @@ -140,7 +140,8 @@ const RocketChat = { user = { ...user, ...userInfo.user }; } RocketChat.registerPushToken(user.id); - return reduxStore.dispatch(loginSuccess(user)); + reduxStore.dispatch(loginSuccess(user)); + this.ddp.subscribe('userData'); } catch (e) { log('rocketchat.loginSuccess', e); } @@ -468,7 +469,7 @@ const RocketChat = { log('rocketchat.logout', e); } } - database.deleteAll(); + // database.deleteAll(); AsyncStorage.removeItem(TOKEN_KEY); AsyncStorage.removeItem(`${ TOKEN_KEY }-${ server }`); }, diff --git a/app/presentation/RoomItem.js b/app/presentation/RoomItem.js index df5ef0131..82e72d2ed 100644 --- a/app/presentation/RoomItem.js +++ b/app/presentation/RoomItem.js @@ -1,91 +1,101 @@ import React from 'react'; import moment from 'moment'; import PropTypes from 'prop-types'; -import { View, Text, StyleSheet, ViewPropTypes } from 'react-native'; -import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; +import { View, Text, StyleSheet, Image, Platform } from 'react-native'; import { connect } from 'react-redux'; +import { emojify } from 'react-emojione'; import Avatar from '../containers/Avatar'; import Status from '../containers/status'; import Touch from '../utils/touch/index'; //eslint-disable-line -import Markdown from '../containers/message/Markdown'; import RoomTypeIcon from '../containers/RoomTypeIcon'; import I18n from '../i18n'; const styles = StyleSheet.create({ container: { flexDirection: 'row', - paddingHorizontal: 16, - paddingVertical: 12, - alignItems: 'center', - borderBottomWidth: StyleSheet.hairlineWidth, - borderBottomColor: '#ddd' + alignItems: 'center' }, - number: { - minWidth: 25, + centerContainer: { + flex: 1, + height: '100%', + marginRight: 4 + }, + title: { + flex: 1, + fontSize: 18, + color: '#0C0D0F', + fontWeight: '400', + marginRight: 5, + paddingTop: 0, + paddingBottom: 0 + }, + alert: { + fontWeight: '600' + }, + row: { + flex: 1, + flexDirection: 'row', + alignItems: 'flex-start' + }, + titleContainer: { + width: '100%', + marginTop: Platform.OS === 'ios' ? 5 : 2, + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'center' + }, + date: { + fontSize: 14, + color: '#9EA2A8', + fontWeight: 'normal', + paddingTop: 0, + paddingBottom: 0 + }, + updateAlert: { + color: '#1D74F5' + }, + unreadNumberContainer: { + minWidth: 23, + padding: 3, borderRadius: 4, - backgroundColor: '#1d74f5', + backgroundColor: '#1D74F5', + alignItems: 'center', + justifyContent: 'center' + }, + unreadNumberText: { color: '#fff', overflow: 'hidden', fontSize: 14, - paddingVertical: 4, - paddingHorizontal: 5, - - textAlign: 'center', - alignItems: 'center', - justifyContent: 'center' - }, - roomNameView: { - flex: 1, - height: '100%', - marginLeft: 16, - marginRight: 4 - }, - roomName: { - flex: 1, - fontSize: 18, - color: '#444', - marginRight: 8 - }, - alert: { - fontWeight: 'bold' - }, - favorite: { - // backgroundColor: '#eee' - }, - row: { - // width: '100%', - flex: 1, - flexDirection: 'row', - alignItems: 'center' - // justifyContent: 'flex-end' - }, - firstRow: { - width: '100%', - flex: 1, - flexDirection: 'row', - alignItems: 'center', - justifyContent: 'center' - }, - update: { - fontSize: 10, - color: '#888', - alignItems: 'center', - justifyContent: 'center' - }, - updateAlert: { - color: '#1d74f5' + fontWeight: '500', + letterSpacing: 0.56 }, status: { - position: 'absolute', - bottom: -3, - right: -3, - borderWidth: 3, - borderColor: '#fff' - }, - type: { - marginRight: 5, + borderRadius: 10, + width: 10, + height: 10, + marginRight: 7, marginTop: 3 + }, + disclosureContainer: { + height: '100%', + marginLeft: 6, + marginRight: 9, + alignItems: 'center', + justifyContent: 'center' + }, + disclosureIndicator: { + width: 20, + height: 20 + }, + emptyDisclosureAndroid: { + width: 15 + }, + markdownText: { + flex: 1, + color: '#9EA2A8', + fontSize: 15, + fontWeight: 'normal' } }); @@ -103,9 +113,9 @@ const renderNumber = (unread, userMentions) => { } return ( - - { unread } - + + { unread } + ); }; @@ -131,13 +141,13 @@ export default class RoomItem extends React.Component { onLongPress: PropTypes.func, username: PropTypes.string, avatarSize: PropTypes.number, - statusStyle: ViewPropTypes.style, - testID: PropTypes.string + testID: PropTypes.string, + height: PropTypes.number } static defaultProps = { showLastMessage: true, - avatarSize: 46 + avatarSize: 48 } shouldComponentUpdate(nextProps) { const oldlastMessage = this.props.lastMessage; @@ -151,11 +161,9 @@ export default class RoomItem extends React.Component { } return attrs.some(key => nextProps[key] !== this.props[key]); } - get icon() { - const { - type, name, id, avatarSize, statusStyle - } = this.props; - return ({type === 'd' ? : null }); + get avatar() { + const { type, name, avatarSize } = this.props; + return ; } get lastMessage() { @@ -178,19 +186,17 @@ export default class RoomItem extends React.Component { prefix = `${ lastMessage.u.username }: `; } - const msg = `${ prefix }${ lastMessage.msg.replace(/[\n\t\r]/igm, '') }`; - const maxChars = 35; - return `${ msg.slice(0, maxChars) }${ msg.replace(/:[a-z0-9]+:/gi, ':::').length > maxChars ? '...' : '' }`; + let msg = `${ prefix }${ lastMessage.msg.replace(/[\n\t\r]/igm, '') }`; + msg = emojify(msg, { output: 'unicode' }); + return msg; } get type() { - const icon = { - c: 'pound', - p: 'lock', - l: 'account', - d: 'at' - }[this.props.type]; - return ; + const { type, id } = this.props; + if (type === 'd') { + return ; + } + return ; } formatDate = date => moment(date).calendar(null, { @@ -200,9 +206,20 @@ export default class RoomItem extends React.Component { sameElse: 'MMM D' }) + renderDisclosureIndicator = () => { + if (Platform.OS === 'ios') { + return ( + + + + ); + } + return ; + } + render() { const { - favorite, unread, userMentions, name, _updatedAt, alert, type, testID + favorite, unread, userMentions, name, _updatedAt, alert, testID, height } = this.props; const date = this.formatDate(_updatedAt); @@ -232,43 +249,22 @@ export default class RoomItem extends React.Component { accessibilityTraits='selected' testID={testID} > - - {this.icon} - - - - { name } - {_updatedAt ? { date } : null} + + {this.avatar} + + + {this.type} + { name } + {_updatedAt ? { date } : null} - ( - - @{node.content} - - ), - hashtag: node => ( - - #{node.content} - - ), - link: (node, children) => ( - - {children} - - ) - }} - /> + + {this.lastMessage} + {renderNumber(unread, userMentions)} + {this.renderDisclosureIndicator()} ); diff --git a/app/presentation/UserItem.js b/app/presentation/UserItem.js new file mode 100644 index 000000000..cf8c07de2 --- /dev/null +++ b/app/presentation/UserItem.js @@ -0,0 +1,57 @@ +import React from 'react'; +import { Text, View, StyleSheet, Platform } from 'react-native'; +import PropTypes from 'prop-types'; + +import Avatar from '../containers/Avatar'; +import Touch from '../utils/touch'; + +const styles = StyleSheet.create({ + button: { + height: 54 + }, + container: { + flexDirection: 'row' + }, + avatar: { + marginHorizontal: 15, + marginVertical: 12 + }, + textContainer: { + flex: 1, + flexDirection: 'column' + }, + name: { + fontSize: 18, + color: '#0C0D0F', + marginTop: Platform.OS === 'ios' ? 6 : 3, + marginBottom: 1 + }, + username: { + fontSize: 14, + color: '#9EA2A8' + } +}); + +const UserItem = ({ + name, username, onPress, testID, onLongPress +}) => ( + + + + + {name} + @{username} + + + +); + +UserItem.propTypes = { + name: PropTypes.string.isRequired, + username: PropTypes.string.isRequired, + onPress: PropTypes.func.isRequired, + testID: PropTypes.string.isRequired, + onLongPress: PropTypes.func +}; + +export default UserItem; diff --git a/app/push.js_ b/app/push.js_ deleted file mode 100644 index 2b898a22d..000000000 --- a/app/push.js_ +++ /dev/null @@ -1,48 +0,0 @@ -import PushNotification from 'react-native-push-notification'; -import { AsyncStorage } from 'react-native'; -import EJSON from 'ejson'; - -import { NavigationActions } from './Navigation'; - -const handleNotification = (notification) => { - if (notification.userInteraction) { - const { - rid, name, sender, type - } = EJSON.parse(notification.ejson || notification.data.ejson); - NavigationActions.push({ - screen: 'RoomView', - passProps: { rid, name: type === 'd' ? sender.username : name } - }); - } -}; -PushNotification.configure({ - - // (optional) Called when Token is generated (iOS and Android) - async onRegister({ token }) { - AsyncStorage.setItem('pushId', token); - }, - - // (required) Called when a remote or local notification is opened or received - onNotification: handleNotification, - - // ANDROID ONLY: GCM Sender ID (optional - not required for local notifications, but is need to receive remote push notifications) - senderID: '673693445664', - - // IOS ONLY (optional): default: all - Permissions to register. - permissions: { - alert: true, - badge: true, - sound: true - }, - - // Should the initial notification be popped automatically - // default: true - popInitialNotification: true, - - /** - * (optional) default: true - * - Specified if permissions (ios) and token (android and ios) will requested or not, - * - if not, you must call PushNotificationsHandler.requestPermissions() later - */ - requestPermissions: true -}); diff --git a/app/reducers/login.js b/app/reducers/login.js index 7f735a0d1..cf4d2ff73 100644 --- a/app/reducers/login.js +++ b/app/reducers/login.js @@ -28,7 +28,10 @@ export default function login(state = initialState, action) { ...state, isFetching: false, isAuthenticated: true, - user: { ...state.user, ...action.user }, + user: { + ...state.user, + ...action.user + }, token: action.user.token, failure: false, error: '' @@ -130,6 +133,20 @@ export default function login(state = initialState, action) { ...state, services: {} }; + case types.LOGIN.SET_PREFERENCE: + return { + ...state, + user: { + ...state.user, + settings: { + ...state.user.settings, + preferences: { + ...state.user.settings.preferences, + ...action.preference + } + } + } + }; default: return state; } diff --git a/app/reducers/rooms.js b/app/reducers/rooms.js index 0565dc80c..09506865d 100644 --- a/app/reducers/rooms.js +++ b/app/reducers/rooms.js @@ -3,7 +3,10 @@ import * as types from '../actions/actionsTypes'; const initialState = { isFetching: false, failure: false, - searchText: '' + searchText: '', + showServerDropdown: false, + closeServerDropdown: false, + showSortDropdown: false }; export default function login(state = initialState, action) { @@ -30,6 +33,26 @@ export default function login(state = initialState, action) { ...state, searchText: action.searchText }; + case types.ROOMS.CLOSE_SERVER_DROPDOWN: + return { + ...state, + closeServerDropdown: !state.closeServerDropdown + }; + case types.ROOMS.TOGGLE_SERVER_DROPDOWN: + return { + ...state, + showServerDropdown: !state.showServerDropdown + }; + case types.ROOMS.CLOSE_SORT_DROPDOWN: + return { + ...state, + closeSortDropdown: !state.closeSortDropdown + }; + case types.ROOMS.TOGGLE_SORT_DROPDOWN: + return { + ...state, + showSortDropdown: !state.showSortDropdown + }; default: return state; } diff --git a/app/sagas/login.js b/app/sagas/login.js index cf7732a19..12f1b01e1 100644 --- a/app/sagas/login.js +++ b/app/sagas/login.js @@ -17,8 +17,7 @@ import { setUsernameRequest, setUsernameSuccess, forgotPasswordSuccess, - forgotPasswordFailure, - setUser + forgotPasswordFailure } from '../actions/login'; import RocketChat from '../lib/rocketchat'; import log from '../utils/log'; @@ -40,7 +39,6 @@ const handleLoginSuccess = function* handleLoginSuccess() { try { const user = yield select(getUser); yield AsyncStorage.setItem(RocketChat.TOKEN_KEY, user.token); - yield put(setUser(user)); if (!user.username || user.isRegistering) { yield put(registerIncomplete()); } else { @@ -96,7 +94,7 @@ const handleLogout = function* handleLogout() { if (server) { try { yield put(appStart('outside')); - yield delay(300); + // yield delay(300); yield call(logoutCall, { server }); } catch (e) { log('handleLogout', e); @@ -137,10 +135,11 @@ const watchLoginOpen = function* watchLoginOpen() { }; const handleSetUser = function* handleSetUser() { + yield delay(2000); const [server, user] = yield all([select(getServer), select(getUser)]); if (user) { // TODO: temporary... remove in future releases - delete user.user; + // delete user.user; if (user.language) { I18n.locale = user.language; } diff --git a/app/static/images/disclosureIndicator.png b/app/static/images/disclosureIndicator.png deleted file mode 100644 index ad75c1fbe..000000000 Binary files a/app/static/images/disclosureIndicator.png and /dev/null differ diff --git a/app/static/images/disclosureIndicator@2x.png b/app/static/images/disclosureIndicator@2x.png deleted file mode 100644 index b3e963102..000000000 Binary files a/app/static/images/disclosureIndicator@2x.png and /dev/null differ diff --git a/app/static/images/disclosureIndicator@3x.png b/app/static/images/disclosureIndicator@3x.png deleted file mode 100644 index 788e682e8..000000000 Binary files a/app/static/images/disclosureIndicator@3x.png and /dev/null differ diff --git a/app/static/images/logo.png b/app/static/images/logo.png index 57a423a6b..ed46c8477 100644 Binary files a/app/static/images/logo.png and b/app/static/images/logo.png differ diff --git a/app/utils/touch/index.android.js b/app/utils/touch/index.android.js index ba4095957..9eb368a42 100644 --- a/app/utils/touch/index.android.js +++ b/app/utils/touch/index.android.js @@ -1,3 +1,24 @@ -import { TouchableNativeFeedback } from 'react-native'; +import React from 'react'; +import { TouchableNativeFeedback, View } from 'react-native'; +import PropTypes from 'prop-types'; -export default TouchableNativeFeedback; +const Touch = ({ + children, style, onPress, ...props +}) => ( + + + {children} + + +); + +Touch.propTypes = { + children: PropTypes.node.isRequired, + style: PropTypes.any, + onPress: PropTypes.func.isRequired +}; + +export default Touch; diff --git a/app/utils/touch/index.ios.js b/app/utils/touch/index.ios.js index 1832befaf..5928032ea 100644 --- a/app/utils/touch/index.ios.js +++ b/app/utils/touch/index.ios.js @@ -1,3 +1,21 @@ +import React from 'react'; import { TouchableHighlight } from 'react-native'; +import PropTypes from 'prop-types'; -export default TouchableHighlight; +const Touch = ({ children, onPress, ...props }) => ( + + {children} + +); + +Touch.propTypes = { + children: PropTypes.node.isRequired, + onPress: PropTypes.func.isRequired +}; + +export default Touch; diff --git a/app/views/NewServerView.js b/app/views/NewServerView.js index e3d35ce90..66e14a7b0 100644 --- a/app/views/NewServerView.js +++ b/app/views/NewServerView.js @@ -47,7 +47,7 @@ const defaultServer = 'https://open.rocket.chat'; failure: state.server.failure, currentServer: state.server.server }), dispatch => ({ - connectServer: (url, adding) => dispatch(serverRequest(url, adding)) + connectServer: url => dispatch(serverRequest(url)) })) /** @extends React.Component */ export default class NewServerView extends LoggedView { diff --git a/app/views/OnboardingView/Button.js b/app/views/OnboardingView/Button.js index e3c3e83f5..59877313a 100644 --- a/app/views/OnboardingView/Button.js +++ b/app/views/OnboardingView/Button.js @@ -45,7 +45,7 @@ export default class Button extends React.PureComponent { {title} {subtitle ? {subtitle} : null} - {type === 'secondary' ? : null} + {type === 'secondary' ? : null} ); diff --git a/app/views/OnboardingView/styles.js b/app/views/OnboardingView/styles.js index 81ed89c5f..412291067 100644 --- a/app/views/OnboardingView/styles.js +++ b/app/views/OnboardingView/styles.js @@ -76,7 +76,9 @@ export default StyleSheet.create({ justifyContent: 'center' }, buttonIcon: { - marginHorizontal: scale(20) + marginHorizontal: scale(10), + width: 20, + height: 20 }, buttonActive: { opacity: 0.5 diff --git a/app/views/PrivacyPolicyView.js b/app/views/PrivacyPolicyView.js index aea3ef372..f86868b4a 100644 --- a/app/views/PrivacyPolicyView.js +++ b/app/views/PrivacyPolicyView.js @@ -4,15 +4,21 @@ import { WebView, SafeAreaView } from 'react-native'; import { connect } from 'react-redux'; import styles from './Styles'; +import LoggedView from './View'; @connect(state => ({ privacyPolicy: state.settings.Layout_Privacy_Policy })) -export default class PrivacyPolicyView extends React.PureComponent { +/** @extends React.Component */ +export default class PrivacyPolicyView extends LoggedView { static propTypes = { privacyPolicy: PropTypes.string } + constructor(props) { + super('PrivacyPolicyView', props); + } + render() { return ( diff --git a/app/views/ProfileView/index.js b/app/views/ProfileView/index.js index 3c5fb4ca2..0b2fb65ec 100644 --- a/app/views/ProfileView/index.js +++ b/app/views/ProfileView/index.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { View, ScrollView, SafeAreaView, Keyboard, Platform } from 'react-native'; +import { View, ScrollView, SafeAreaView, Keyboard, Platform, Dimensions } from 'react-native'; import { connect } from 'react-redux'; import Dialog from 'react-native-dialog'; import SHA256 from 'js-sha256'; @@ -22,7 +22,6 @@ import I18n from '../../i18n'; import Button from '../../containers/Button'; import Avatar from '../../containers/Avatar'; import Touch from '../../utils/touch'; -import { iconsMap } from '../../Icons'; @connect(state => ({ user: { @@ -63,7 +62,7 @@ export default class ProfileView extends LoggedView { this.props.navigator.setButtons({ leftButtons: [{ id: 'sideMenu', - icon: Platform.OS === 'ios' ? iconsMap.menu : undefined + icon: { uri: 'settings', scale: Dimensions.get('window').scale } }] }); } @@ -94,9 +93,7 @@ export default class ProfileView extends LoggedView { if (event.type === 'NavBarButtonPress') { if (event.id === 'sideMenu' && Platform.OS === 'ios') { this.props.navigator.toggleDrawer({ - side: 'left', - animated: true, - to: 'missing' + side: 'left' }); } } diff --git a/app/views/RoomActionsView/index.js b/app/views/RoomActionsView/index.js index 0af3cd387..93af3e2bd 100644 --- a/app/views/RoomActionsView/index.js +++ b/app/views/RoomActionsView/index.js @@ -20,7 +20,6 @@ import I18n from '../../i18n'; import scrollPersistTaps from '../../utils/scrollPersistTaps'; const renderSeparator = () => ; -const getRoomTitle = room => (room.t === 'd' ? {room.fname} :  {room.name}); @connect(state => ({ userId: state.login.user && state.login.user.id, @@ -347,7 +346,13 @@ export default class RoomActionsView extends LoggedView { {t === 'd' ? : null } , - { getRoomTitle(room) } + {room.t === 'd' ? + {room.fname} : + + + {room.name} + + } {t === 'd' ? `@${ name }` : topic} , diff --git a/app/views/RoomActionsView/styles.js b/app/views/RoomActionsView/styles.js index 50182bee8..70cd2789c 100644 --- a/app/views/RoomActionsView/styles.js +++ b/app/views/RoomActionsView/styles.js @@ -51,5 +51,9 @@ export default StyleSheet.create({ roomDescription: { fontSize: 12, color: '#ccc' + }, + roomTitleRow: { + flexDirection: 'row', + alignItems: 'center' } }); diff --git a/app/views/RoomInfoView/index.js b/app/views/RoomInfoView/index.js index 11a72da63..69343c69e 100644 --- a/app/views/RoomInfoView/index.js +++ b/app/views/RoomInfoView/index.js @@ -23,8 +23,10 @@ const camelize = str => str.replace(/^(.)/, (match, chr) => chr.toUpperCase()); const getRoomTitle = room => (room.t === 'd' ? {room.fname} : [ - , - {room.name} + + + {room.name} + ] ); diff --git a/app/views/RoomInfoView/styles.js b/app/views/RoomInfoView/styles.js index 6e0c81dd7..bd2e8e422 100644 --- a/app/views/RoomInfoView/styles.js +++ b/app/views/RoomInfoView/styles.js @@ -38,6 +38,10 @@ export default StyleSheet.create({ color: '#ccc', paddingTop: 10 }, + roomTitleRow: { + flexDirection: 'row', + alignItems: 'center' + }, status: { borderRadius: 24, width: 24, diff --git a/app/views/RoomMembersView/index.js b/app/views/RoomMembersView/index.js index 5c6ce2f6b..65e8a235e 100644 --- a/app/views/RoomMembersView/index.js +++ b/app/views/RoomMembersView/index.js @@ -1,12 +1,11 @@ import React from 'react'; import PropTypes from 'prop-types'; import { FlatList, View, TextInput, Vibration, SafeAreaView } from 'react-native'; -import { connect } from 'react-redux'; import ActionSheet from 'react-native-actionsheet'; import LoggedView from '../View'; import styles from './styles'; -import RoomItem from '../../presentation/RoomItem'; +import UserItem from '../../presentation/UserItem'; import scrollPersistTaps from '../../utils/scrollPersistTaps'; import RocketChat from '../../lib/rocketchat'; import database from '../../lib/realm'; @@ -14,10 +13,6 @@ import { showToast } from '../../utils/info'; import log from '../../utils/log'; import I18n from '../../i18n'; - -@connect(state => ({ - baseUrl: state.settings.Site_Url || state.server ? state.server.server : '' -})) /** @extends React.Component */ export default class RoomMembersView extends LoggedView { static navigatorButtons = { @@ -31,8 +26,7 @@ export default class RoomMembersView extends LoggedView { static propTypes = { navigator: PropTypes.object, rid: PropTypes.string, - members: PropTypes.array, - baseUrl: PropTypes.string + members: PropTypes.array } constructor(props) { @@ -187,16 +181,11 @@ export default class RoomMembersView extends LoggedView { renderSeparator = () => ; renderItem = ({ item }) => ( - this.onPressUser(item)} onLongPress={() => this.onLongPressUser(item)} - id={item._id} - showLastMessage={false} - avatarSize={30} - statusStyle={styles.status} testID={`room-members-view-item-${ item.username }`} /> ) diff --git a/app/views/RoomMembersView/styles.js b/app/views/RoomMembersView/styles.js index 07e5c1e5a..9c09f02c0 100644 --- a/app/views/RoomMembersView/styles.js +++ b/app/views/RoomMembersView/styles.js @@ -24,7 +24,8 @@ export default StyleSheet.create({ }, separator: { height: StyleSheet.hairlineWidth, - backgroundColor: '#ddd' + backgroundColor: '#E1E5E8', + marginLeft: 60 }, username: { flex: 1, diff --git a/app/views/RoomsListView/Header/Header.android.js b/app/views/RoomsListView/Header/Header.android.js new file mode 100644 index 000000000..40c2169a4 --- /dev/null +++ b/app/views/RoomsListView/Header/Header.android.js @@ -0,0 +1,50 @@ +import React from 'react'; +import { Text, View, TouchableOpacity, Image, StyleSheet } from 'react-native'; +import PropTypes from 'prop-types'; + +const styles = StyleSheet.create({ + container: { + flex: 1, + justifyContent: 'center' + }, + button: { + flexDirection: 'row', + alignItems: 'center' + }, + server: { + fontSize: 20, + color: '#FFF' + }, + disclosure: { + marginLeft: 9, + marginTop: 1, + width: 10, + height: 5 + }, + upsideDown: { + transform: [{ scaleY: -1 }] + } +}); + +const Header = ({ onPress, serverName, showServerDropdown }) => ( + + + + {serverName} + + + + +); + +Header.propTypes = { + onPress: PropTypes.func.isRequired, + serverName: PropTypes.string, + showServerDropdown: PropTypes.bool.isRequired +}; + +Header.defaultProps = { + serverName: 'Rocket.Chat' +}; + +export default Header; diff --git a/app/views/RoomsListView/Header/Header.ios.js b/app/views/RoomsListView/Header/Header.ios.js new file mode 100644 index 000000000..c9594f0f9 --- /dev/null +++ b/app/views/RoomsListView/Header/Header.ios.js @@ -0,0 +1,56 @@ +import React from 'react'; +import { Text, View, TouchableOpacity, Image, StyleSheet } from 'react-native'; +import PropTypes from 'prop-types'; + +import I18n from '../../../i18n'; + +const styles = StyleSheet.create({ + container: { + flex: 1, + alignItems: 'center' + }, + button: { + flexDirection: 'row' + }, + title: { + fontSize: 14, + color: '#0C0D0F' + }, + server: { + fontSize: 12, + color: '#1D74F5' + }, + disclosure: { + marginLeft: 3, + marginTop: 2, + width: 12, + height: 9 + }, + upsideDown: { + transform: [{ scaleY: -1 }] + } +}); + +const Header = ({ onPress, serverName, showServerDropdown }) => ( + + {I18n.t('Messages')} + + + {serverName} + + + + +); + +Header.propTypes = { + onPress: PropTypes.func.isRequired, + serverName: PropTypes.string, + showServerDropdown: PropTypes.bool.isRequired +}; + +Header.defaultProps = { + serverName: 'Rocket.Chat' +}; + +export default Header; diff --git a/app/views/RoomsListView/Header/index.js b/app/views/RoomsListView/Header/index.js new file mode 100644 index 000000000..b00ef959f --- /dev/null +++ b/app/views/RoomsListView/Header/index.js @@ -0,0 +1,53 @@ +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; +import { connect } from 'react-redux'; + +import { toggleServerDropdown, closeServerDropdown, closeSortDropdown } from '../../../actions/rooms'; +import Header from './Header'; + +@connect(state => ({ + showServerDropdown: state.rooms.showServerDropdown, + showSortDropdown: state.rooms.showSortDropdown, + serverName: state.settings.Site_Name +}), dispatch => ({ + close: () => dispatch(closeServerDropdown()), + open: () => dispatch(toggleServerDropdown()), + closeSort: () => dispatch(closeSortDropdown()) +})) +export default class RoomsListHeaderView extends Component { + static propTypes = { + showServerDropdown: PropTypes.bool, + showSortDropdown: PropTypes.bool, + serverName: PropTypes.string, + open: PropTypes.func, + close: PropTypes.func, + closeSort: PropTypes.func + } + + onPress = () => { + const { + showServerDropdown, showSortDropdown, close, open, closeSort + } = this.props; + if (showServerDropdown) { + close(); + } else if (showSortDropdown) { + closeSort(); + setTimeout(() => { + open(); + }, 300); + } else { + open(); + } + } + + render() { + const { serverName, showServerDropdown } = this.props; + return ( +
+ ); + } +} diff --git a/app/views/RoomsListView/Search/index.js b/app/views/RoomsListView/Search/index.js index cd69be4d8..8d71c85e1 100644 --- a/app/views/RoomsListView/Search/index.js +++ b/app/views/RoomsListView/Search/index.js @@ -33,6 +33,7 @@ export default class RoomsListSearchView extends React.Component { onChangeText={text => this.onSearchChangeText(text)} returnKeyType='search' placeholder={I18n.t('Search')} + placeholderTextColor='#eee' clearButtonMode='while-editing' blurOnSubmit autoCorrect={false} diff --git a/app/views/RoomsListView/Search/styles.js b/app/views/RoomsListView/Search/styles.js index 3a4b29c6f..4d35f2ea9 100644 --- a/app/views/RoomsListView/Search/styles.js +++ b/app/views/RoomsListView/Search/styles.js @@ -10,6 +10,6 @@ export default StyleSheet.create({ inputSearch: { flex: 1, fontSize: 18, - color: '#444' + color: '#fff' } }); diff --git a/app/views/RoomsListView/ServerDropdown.js b/app/views/RoomsListView/ServerDropdown.js new file mode 100644 index 000000000..b399780e3 --- /dev/null +++ b/app/views/RoomsListView/ServerDropdown.js @@ -0,0 +1,169 @@ +import React, { Component } from 'react'; +import { View, Text, Animated, Easing, TouchableWithoutFeedback, TouchableOpacity, FlatList, Image, AsyncStorage } from 'react-native'; +import PropTypes from 'prop-types'; +import { connect } from 'react-redux'; + +import styles from './styles'; +import { toggleServerDropdown } from '../../actions/rooms'; +import { selectServerRequest } from '../../actions/server'; +import { appStart } from '../../actions'; +import database from '../../lib/realm'; +import Touch from '../../utils/touch'; +import RocketChat from '../../lib/rocketchat'; +import I18n from '../../i18n'; + +const ROW_HEIGHT = 68; +const ANIMATION_DURATION = 200; + +@connect(state => ({ + closeServerDropdown: state.rooms.closeServerDropdown, + server: state.server.server +}), dispatch => ({ + toggleServerDropdown: () => dispatch(toggleServerDropdown()), + selectServerRequest: server => dispatch(selectServerRequest(server)), + appStart: () => dispatch(appStart('outside')) +})) +export default class ServerDropdown extends Component { + static propTypes = { + navigator: PropTypes.object, + closeServerDropdown: PropTypes.bool, + server: PropTypes.string, + toggleServerDropdown: PropTypes.func, + selectServerRequest: PropTypes.func, + appStart: PropTypes.func + } + + constructor(props) { + super(props); + this.state = { + servers: [] + }; + this.animatedValue = new Animated.Value(0); + } + + componentDidMount() { + Animated.timing( + this.animatedValue, + { + toValue: 1, + duration: ANIMATION_DURATION, + easing: Easing.ease, + useNativeDriver: true + }, + ).start(); + this.servers = database.databases.serversDB.objects('servers'); + this.servers.addListener(this.updateState); + } + + componentDidUpdate(prevProps) { + if (prevProps.closeServerDropdown !== this.props.closeServerDropdown) { + this.close(); + } + } + + updateState = () => { + const { servers } = this; + this.setState({ servers }); + } + + close = () => { + Animated.timing( + this.animatedValue, + { + toValue: 0, + duration: ANIMATION_DURATION, + easing: Easing.ease, + useNativeDriver: true + } + ).start(() => this.props.toggleServerDropdown()); + } + + addServer = () => { + this.close(); + setTimeout(() => { + this.props.navigator.showModal({ + screen: 'NewServerView', + title: I18n.t('Add_Server'), + passProps: { + previousServer: this.props.server + } + }); + }, ANIMATION_DURATION); + } + + select = async(server) => { + this.close(); + if (this.props.server !== server) { + this.props.selectServerRequest(server); + const token = await AsyncStorage.getItem(`${ RocketChat.TOKEN_KEY }-${ server }`); + if (!token) { + this.props.appStart(); + setTimeout(() => { + this.props.navigator.push({ + screen: 'NewServerView', + passProps: { + server + }, + navigatorStyle: { + navBarHidden: true + } + }); + }, 1000); + } + } + } + + renderSeparator = () => ; + + renderServer = ({ item }) => ( + this.select(item.id)} style={styles.serverItem} testID={`rooms-list-header-server-${ item.id }`}> + + + + {item.name || item.id} + {item.id} + + {item.id === this.props.server ? : null} + + + ) + + render() { + const maxRows = 4; + const initialTop = 41 + (Math.min(this.state.servers.length, maxRows) * ROW_HEIGHT); + const translateY = this.animatedValue.interpolate({ + inputRange: [0, 1], + outputRange: [-initialTop, 0] + }); + const backdropOpacity = this.animatedValue.interpolate({ + inputRange: [0, 1], + outputRange: [0, 0.3] + }); + return ( + [ + + + , + + + {I18n.t('Server')} + + {I18n.t('Add_Server')} + + + item.id} + renderItem={this.renderServer} + ItemSeparatorComponent={this.renderSeparator} + /> + + ] + ); + } +} diff --git a/app/views/RoomsListView/SortDropdown.js b/app/views/RoomsListView/SortDropdown.js new file mode 100644 index 000000000..5ecc37c9c --- /dev/null +++ b/app/views/RoomsListView/SortDropdown.js @@ -0,0 +1,166 @@ +import React, { Component } from 'react'; +import { View, Text, Animated, Easing, Image, TouchableWithoutFeedback } from 'react-native'; +import PropTypes from 'prop-types'; +import { connect } from 'react-redux'; + +import Touch from '../../utils/touch'; +import styles from './styles'; +import RocketChat from '../../lib/rocketchat'; +import { setPreference } from '../../actions/login'; +import log from '../../utils/log'; +import I18n from '../../i18n'; + +const ANIMATION_DURATION = 200; + +@connect(state => ({ + closeSortDropdown: state.rooms.closeSortDropdown +}), dispatch => ({ + setPreference: preference => dispatch(setPreference(preference)) +})) +export default class Sort extends Component { + static propTypes = { + closeSortDropdown: PropTypes.bool, + close: PropTypes.func, + sidebarSortby: PropTypes.string, + sidebarGroupByType: PropTypes.bool, + sidebarShowFavorites: PropTypes.bool, + sidebarShowUnread: PropTypes.bool, + setPreference: PropTypes.func + } + + constructor(props) { + super(props); + this.animatedValue = new Animated.Value(0); + } + + componentDidMount() { + Animated.timing( + this.animatedValue, + { + toValue: 1, + duration: ANIMATION_DURATION, + easing: Easing.ease, + useNativeDriver: true + }, + ).start(); + } + + componentDidUpdate(prevProps) { + if (prevProps.closeSortDropdown !== this.props.closeSortDropdown) { + this.close(); + } + } + + saveUserPreference = async(param) => { + try { + this.props.setPreference(param); + await RocketChat.saveUserPreferences(param); + } catch (e) { + log('RoomsListView.saveUserPreference', e); + } + } + + sortByName = () => { + this.saveUserPreference({ sidebarSortby: 'alphabetical' }); + } + + sortByActivity = () => { + this.saveUserPreference({ sidebarSortby: 'activity' }); + } + + toggleGroupByType = () => { + this.saveUserPreference({ sidebarGroupByType: !this.props.sidebarGroupByType }); + } + + toggleGroupByFavorites = () => { + this.saveUserPreference({ sidebarShowFavorites: !this.props.sidebarShowFavorites }); + } + + toggleUnread = () => { + this.saveUserPreference({ sidebarShowUnread: !this.props.sidebarShowUnread }); + } + + close = () => { + Animated.timing( + this.animatedValue, + { + toValue: 0, + duration: ANIMATION_DURATION, + easing: Easing.ease, + useNativeDriver: true + }, + ).start(() => this.props.close()); + } + + render() { + const translateY = this.animatedValue.interpolate({ + inputRange: [0, 1], + outputRange: [-245, 41] + }); + const backdropOpacity = this.animatedValue.interpolate({ + inputRange: [0, 1], + outputRange: [0, 0.3] + }); + const { + sidebarSortby, sidebarGroupByType, sidebarShowFavorites, sidebarShowUnread + } = this.props; + return ( + [ + + + , + + + + + {I18n.t('Alphabetical')} + {sidebarSortby === 'alphabetical' ? : null} + + + + + + {I18n.t('Activity')} + {sidebarSortby === 'activity' ? : null} + + + + + + + {I18n.t('Group_by_type')} + {sidebarGroupByType ? : null} + + + + + + {I18n.t('Group_by_favorites')} + {sidebarShowFavorites ? : null} + + + + + + {I18n.t('Unread_on_top')} + {sidebarShowUnread ? : null} + + + , + + + {I18n.t('Sorting_by', { key: I18n.t(this.props.sidebarSortby === 'alphabetical' ? 'name' : 'activity') })} + + + + ] + ); + } +} diff --git a/app/views/RoomsListView/index.js b/app/views/RoomsListView/index.js index de7daa4d4..f82dd681a 100644 --- a/app/views/RoomsListView/index.js +++ b/app/views/RoomsListView/index.js @@ -1,36 +1,99 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { Platform, View, TextInput, FlatList, BackHandler, ActivityIndicator, SafeAreaView } from 'react-native'; +import { Platform, View, TextInput, FlatList, BackHandler, ActivityIndicator, SafeAreaView, Text, Image, Dimensions, ScrollView, Keyboard } from 'react-native'; import { connect } from 'react-redux'; +import { isEqual } from 'lodash'; -import { iconsMap } from '../../Icons'; import database from '../../lib/realm'; import RocketChat from '../../lib/rocketchat'; import RoomItem from '../../presentation/RoomItem'; import styles from './styles'; -import debounce from '../../utils/debounce'; import LoggedView from '../View'; import log from '../../utils/log'; import I18n from '../../i18n'; +import SortDropdown from './SortDropdown'; +import ServerDropdown from './ServerDropdown'; +import Touch from '../../utils/touch'; +import { toggleSortDropdown } from '../../actions/rooms'; -const ROW_HEIGHT = 70.5; +const ROW_HEIGHT = 70; -@connect(state => ({ - userId: state.login.user && state.login.user.id, - server: state.server.server, - Site_Url: state.settings.Site_Url, - searchText: state.rooms.searchText, - loadingServer: state.server.loading +const isAndroid = () => Platform.OS === 'android'; +const getItemLayout = (data, index) => ({ length: ROW_HEIGHT, offset: ROW_HEIGHT * index, index }); +const leftButtons = [{ + id: 'settings', + icon: { uri: 'settings', scale: Dimensions.get('window').scale }, + testID: 'rooms-list-view-sidebar' +}]; +const rightButtons = [{ + id: 'createChannel', + icon: { uri: 'new_channel', scale: Dimensions.get('window').scale }, + testID: 'rooms-list-view-create-channel' +}]; + +if (Platform.OS === 'android') { + rightButtons.push({ + id: 'search', + icon: { uri: 'search', scale: Dimensions.get('window').scale } + }); +} + + +@connect((state) => { + let result = { + userId: state.login.user && state.login.user.id, + server: state.server.server, + Site_Url: state.settings.Site_Url, + searchText: state.rooms.searchText, + loadingServer: state.server.loading, + showServerDropdown: state.rooms.showServerDropdown, + showSortDropdown: state.rooms.showSortDropdown, + sidebarSortby: null, + sidebarGroupByType: null, + sidebarShowFavorites: null, + sidebarShowUnread: null + }; + if (state.login && state.login.user && state.login.user.settings && state.login.user.settings.preferences) { + result = { + ...result, + sidebarSortby: state.login.user.settings.preferences.sidebarSortby, + sidebarGroupByType: state.login.user.settings.preferences.sidebarGroupByType, + sidebarShowFavorites: state.login.user.settings.preferences.sidebarShowFavorites, + sidebarShowUnread: state.login.user.settings.preferences.sidebarShowUnread + }; + } + return result; +}, dispatch => ({ + toggleSortDropdown: () => dispatch(toggleSortDropdown()) })) /** @extends React.Component */ export default class RoomsListView extends LoggedView { + static navigatorButtons = { + leftButtons, rightButtons + } + + static navigatorStyle = { + navBarCustomView: 'RoomsListHeaderView', + navBarComponentAlignment: 'fill', + navBarBackgroundColor: isAndroid() ? '#2F343D' : undefined, + navBarTextColor: isAndroid() ? '#FFF' : undefined, + navBarButtonColor: isAndroid() ? '#FFF' : undefined + } + static propTypes = { navigator: PropTypes.object, userId: PropTypes.string, Site_Url: PropTypes.string, server: PropTypes.string, searchText: PropTypes.string, - loadingServer: PropTypes.bool + loadingServer: PropTypes.bool, + showServerDropdown: PropTypes.bool, + showSortDropdown: PropTypes.bool, + sidebarSortby: PropTypes.string, + sidebarGroupByType: PropTypes.bool, + sidebarShowFavorites: PropTypes.bool, + sidebarShowUnread: PropTypes.bool, + toggleSortDropdown: PropTypes.func } constructor(props) { @@ -38,13 +101,19 @@ export default class RoomsListView extends LoggedView { this.state = { search: [], - rooms: [], - loading: true + loading: true, + chats: [], + unread: [], + favorites: [], + channels: [], + privateGroup: [], + direct: [], + livechat: [] }; props.navigator.setOnNavigatorEvent(this.onNavigatorEvent.bind(this)); } - async componentWillMount() { + componentWillMount() { this.initDefaultHeader(); } @@ -52,21 +121,42 @@ export default class RoomsListView extends LoggedView { this.getSubscriptions(); } - componentWillReceiveProps(props) { - if (props.server && props.loadingServer) { - this.setState({ loading: true }); - } else if (props.server && !props.loadingServer) { + componentWillReceiveProps(nextProps) { + if (nextProps.server && this.props.loadingServer !== nextProps.loadingServer) { + if (nextProps.loadingServer) { + this.setState({ loading: true }); + } else { + this.getSubscriptions(); + } + } else if (this.props.searchText !== nextProps.searchText) { + this.search(nextProps.searchText); + } + } + + shouldComponentUpdate(nextProps, nextState) { + return !(isEqual(this.props, nextProps) && isEqual(this.state, nextState)); + } + + componentDidUpdate(prevProps) { + if (!( + (prevProps.sidebarSortby === this.props.sidebarSortby) && + (prevProps.sidebarGroupByType === this.props.sidebarGroupByType) && + (prevProps.sidebarShowFavorites === this.props.sidebarShowFavorites) && + (prevProps.sidebarShowUnread === this.props.sidebarShowUnread) + )) { this.getSubscriptions(); - } else if (this.props.searchText !== props.searchText) { - this.search(props.searchText); } } componentWillUnmount() { - this.updateState.stop(); - if (this.data) { - this.data.removeAllListeners(); - } + this.removeListener(this.data); + this.removeListener(this.unread); + this.removeListener(this.favorites); + this.removeListener(this.channels); + this.removeListener(this.privateGroup); + this.removeListener(this.direct); + this.removeListener(this.livechat); + if (this.timeout) { clearTimeout(this.timeout); } @@ -76,26 +166,24 @@ export default class RoomsListView extends LoggedView { const { navigator } = this.props; if (event.type === 'NavBarButtonPress') { if (event.id === 'createChannel') { - navigator.push({ + this.props.navigator.push({ screen: 'SelectedUsersView', title: I18n.t('Select_Users'), passProps: { nextAction: 'CREATE_CHANNEL' } }); - } else if (event.id === 'sideMenu' && Platform.OS === 'ios') { + } else if (event.id === 'settings') { navigator.toggleDrawer({ - side: 'left', - animated: true, - to: 'missing' + side: 'left' }); } else if (event.id === 'search') { this.initSearchingAndroid(); - } else if (event.id === 'cancelSearch') { + } else if (event.id === 'cancelSearch' || event.id === 'back') { this.cancelSearchingAndroid(); } } else if (event.type === 'ScreenChangedEvent' && event.id === 'didAppear') { - this.props.navigator.setDrawerEnabled({ + navigator.setDrawerEnabled({ side: 'left', enabled: true }); @@ -107,40 +195,100 @@ export default class RoomsListView extends LoggedView { } getSubscriptions = () => { - if (this.data && this.data.removeListener) { - this.data.removeListener(this.updateState); - } if (this.props.server && this.hasActiveDB()) { - this.data = database.objects('subscriptions').filtered('archived != true && open == true').sorted('roomUpdatedAt', true); - this.data.addListener(this.updateState); + if (this.props.sidebarSortby === 'alphabetical') { + this.data = database.objects('subscriptions').filtered('archived != true && open == true').sorted('name', false); + } else { + this.data = database.objects('subscriptions').filtered('archived != true && open == true').sorted('roomUpdatedAt', true); + } + + let chats = []; + let unread = []; + let favorites = []; + let channels = []; + let privateGroup = []; + let direct = []; + let livechat = []; + + // unread + if (this.props.sidebarShowUnread) { + this.unread = this.data.filtered('archived != true && open == true').sorted('name', false).filtered('(unread > 0 || alert == true)'); + unread = this.unread.slice(); + setTimeout(() => { + this.unread.addListener(() => this.setState({ unread: this.unread.slice() })); + }); + } else { + this.removeListener(unread); + } + // favorites + if (this.props.sidebarShowFavorites) { + this.favorites = this.data.filtered('f == true'); + favorites = this.favorites.slice(); + setTimeout(() => { + this.favorites.addListener(() => this.setState({ favorites: this.favorites.slice() })); + }); + } else { + this.removeListener(favorites); + } + // type + if (this.props.sidebarGroupByType) { + // channels + this.channels = this.data.filtered('t == $0', 'c'); + channels = this.channels.slice(); + // private + this.privateGroup = this.data.filtered('t == $0', 'p'); + privateGroup = this.privateGroup.slice(); + // direct + this.direct = this.data.filtered('t == $0', 'd'); + direct = this.direct.slice(); + // livechat + this.livechat = this.data.filtered('t == $0', 'l'); + livechat = this.livechat.slice(); + setTimeout(() => { + this.channels.addListener(() => this.setState({ channels: this.channels.slice() })); + this.privateGroup.addListener(() => this.setState({ privateGroup: this.privateGroup.slice() })); + this.direct.addListener(() => this.setState({ direct: this.direct.slice() })); + this.livechat.addListener(() => this.setState({ livechat: this.livechat.slice() })); + }); + this.removeListener(this.chats); + } else { + // chats + this.chats = this.data.filtered('(unread == 0 && alert == false)'); + chats = this.chats.slice(); + setTimeout(() => { + this.chats.addListener(() => this.setState({ chats: this.chats.slice() })); + }); + this.removeListener(this.channels); + this.removeListener(this.privateGroup); + this.removeListener(this.direct); + this.removeListener(this.livechat); + } + + // setState + this.setState({ + chats, unread, favorites, channels, privateGroup, direct, livechat + }); } this.timeout = setTimeout(() => { this.setState({ loading: false }); }, 200); } + removeListener = (data) => { + if (data && data.removeAllListeners) { + data.removeAllListeners(); + } + } + initDefaultHeader = () => { const { navigator } = this.props; - const rightButtons = [{ - id: 'createChannel', - icon: iconsMap.add, - testID: 'rooms-list-view-create-channel' - }]; - - if (Platform.OS === 'android') { - rightButtons.push({ - id: 'search', - icon: iconsMap.search - }); - } - - navigator.setButtons({ - leftButtons: [{ - id: 'sideMenu', - icon: Platform.OS === 'ios' ? iconsMap.menu : undefined, - testID: 'rooms-list-view-sidebar' - }], - rightButtons + navigator.setButtons({ leftButtons, rightButtons }); + navigator.setStyle({ + navBarCustomView: 'RoomsListHeaderView', + navBarComponentAlignment: 'fill', + navBarBackgroundColor: isAndroid() ? '#2F343D' : undefined, + navBarTextColor: isAndroid() ? '#FFF' : undefined, + navBarButtonColor: isAndroid() ? '#FFF' : undefined }); } @@ -149,7 +297,7 @@ export default class RoomsListView extends LoggedView { navigator.setButtons({ leftButtons: [{ id: 'cancelSearch', - icon: iconsMap['md-arrow-back'] + icon: { uri: 'back', scale: Dimensions.get('window').scale } }], rightButtons: [] }); @@ -165,11 +313,9 @@ export default class RoomsListView extends LoggedView { cancelSearchingAndroid = () => { if (Platform.OS === 'android') { - this.props.navigator.setStyle({ - navBarCustomView: '' - }); this.setState({ search: [] }); this.initDefaultHeader(); + Keyboard.dismiss(); BackHandler.removeEventListener('hardwareBackPress', this.handleBackPress); } } @@ -179,9 +325,7 @@ export default class RoomsListView extends LoggedView { return true; } - updateState = debounce(() => { - this.setState({ rooms: this.data.slice() }); - }) + _isUnread = item => item.unread > 0 || item.alert async search(text) { const searchText = text.trim(); @@ -262,22 +406,47 @@ export default class RoomsListView extends LoggedView { } } - renderSearchBar = () => ( - - this.onSearchChangeText(text)} - returnKeyType='search' - placeholder={I18n.t('Search')} - clearButtonMode='while-editing' - blurOnSubmit - autoCorrect={false} - autoCapitalize='none' - testID='rooms-list-view-search' - /> - - ); + toggleSort = () => this.props.toggleSortDropdown(); + + renderHeader = () => { + if (this.state.search.length > 0) { + return null; + } + return this.renderSort(); + } + + renderSort = () => ( + + + {I18n.t('Sorting_by', { key: I18n.t(this.props.sidebarSortby === 'alphabetical' ? 'name' : 'activity') })} + + + + ) + + renderSearchBar = () => { + if (Platform.OS === 'ios') { + return ( + + this.onSearchChangeText(text)} + returnKeyType='search' + placeholder={I18n.t('Search')} + clearButtonMode='while-editing' + blurOnSubmit + autoCorrect={false} + autoCapitalize='none' + testID='rooms-list-view-search' + /> + + ); + } + } renderItem = ({ item }) => { const id = item.rid.replace(this.props.userId, '').trim(); @@ -295,34 +464,109 @@ export default class RoomsListView extends LoggedView { baseUrl={this.props.Site_Url} onPress={() => this._onPressItem(item)} testID={`rooms-list-view-item-${ item.name }`} + height={ROW_HEIGHT} />); } - renderList = () => { - if (this.state.loading) { - return ; + renderSeparator = () => ; + + renderSection = (data, header) => { + if (data.length > 0) { + return ( + item.rid} + style={styles.list} + renderItem={this.renderItem} + ItemSeparatorComponent={this.renderSeparator} + ListHeaderComponent={() => ( + + {I18n.t(header)} + + )} + getItemLayout={getItemLayout} + enableEmptySections + removeClippedSubviews + keyboardShouldPersistTaps='always' + /> + ); } + return null; + } + + renderList = () => { + const { + search, chats, unread, favorites, channels, direct, privateGroup, livechat + } = this.state; + + if (search.length > 0) { + return ( + item.rid} + style={styles.list} + renderItem={this.renderItem} + ItemSeparatorComponent={this.renderSeparator} + getItemLayout={getItemLayout} + enableEmptySections + removeClippedSubviews + keyboardShouldPersistTaps='always' + /> + ); + } + return ( - 0 ? this.state.search : this.state.rooms} - extraData={this.state.search.length > 0 ? this.state.search : this.state.rooms} - keyExtractor={item => item.rid} - style={styles.list} - renderItem={this.renderItem} - ListHeaderComponent={Platform.OS === 'ios' ? this.renderSearchBar : null} - contentOffset={Platform.OS === 'ios' ? { x: 0, y: 38 } : {}} - getItemLayout={(data, index) => ({ length: ROW_HEIGHT, offset: ROW_HEIGHT * index, index })} - enableEmptySections - removeClippedSubviews - keyboardShouldPersistTaps='always' - testID='rooms-list-view-list' - /> + + {this.renderSection(unread, 'Unread')} + {this.renderSection(favorites, 'Favorites')} + {this.renderSection(channels, 'Channels')} + {this.renderSection(direct, 'Direct_Messages')} + {this.renderSection(privateGroup, 'Private_Groups')} + {this.renderSection(livechat, 'Livechat')} + {this.renderSection(chats, 'Chats')} + ); } - render = () => ( - - {this.renderList()} - - ) + renderScroll = () => { + if (this.state.loading) { + return ; + } + + return ( + + {this.renderSearchBar()} + {this.renderHeader()} + {this.renderList()} + + ); + } + + render = () => { + const { + sidebarSortby, sidebarGroupByType, sidebarShowFavorites, sidebarShowUnread, showServerDropdown, showSortDropdown + } = this.props; + + return ( + + {this.renderScroll()} + {showSortDropdown ? + : + null} + {showServerDropdown ? : null} + + ); + } } diff --git a/app/views/RoomsListView/styles.js b/app/views/RoomsListView/styles.js index 9f7d8dfd6..1f5afa5ea 100644 --- a/app/views/RoomsListView/styles.js +++ b/app/views/RoomsListView/styles.js @@ -1,12 +1,16 @@ -import { StyleSheet } from 'react-native'; +import { StyleSheet, Platform } from 'react-native'; + +const isIOS = () => Platform.OS === 'ios'; export default StyleSheet.create({ container: { - flex: 1 + flex: 1, + backgroundColor: isIOS() ? '#FFF' : '#E1E5E8' }, separator: { - height: 1, - backgroundColor: '#E7E7E7' + height: StyleSheet.hairlineWidth, + backgroundColor: '#E1E5E8', + marginLeft: 78 }, list: { width: '100%', @@ -40,5 +44,129 @@ export default StyleSheet.create({ }, loading: { flex: 1 + }, + dropdownContainerHeader: { + height: 41, + borderBottomWidth: StyleSheet.hairlineWidth, + borderColor: '#E1E5E8', + alignItems: 'center', + backgroundColor: isIOS() ? '#fff' : '#54585E', + flexDirection: 'row' + }, + sortToggleContainerClose: { + position: 'absolute', + top: 0, + width: '100%' + }, + sortToggleText: { + color: '#9EA2A8', + fontSize: 15, + fontWeight: 'normal', + flex: 1, + marginLeft: 15 + }, + dropdownContainer: { + backgroundColor: '#fff', + width: '100%', + position: 'absolute', + top: 0 + }, + sortItemButton: { + height: 57, + justifyContent: 'center' + }, + sortItemContainer: { + flexDirection: 'row', + alignItems: 'center' + }, + sortItemText: { + color: '#54585E', + fontSize: 18, + fontWeight: 'normal', + flex: 1 + }, + backdrop: { + ...StyleSheet.absoluteFill, + backgroundColor: '#000000' + }, + sortSeparator: { + height: StyleSheet.hairlineWidth, + backgroundColor: '#CBCED1', + marginHorizontal: 15, + flex: 1 + }, + sortIcon: { + width: 20, + height: 20, + marginHorizontal: 15, + resizeMode: 'contain', + justifyContent: 'center' + }, + groupTitleContainer: { + paddingHorizontal: 15, + paddingTop: 17, + paddingBottom: 10, + backgroundColor: isIOS() ? '#fff' : '#E1E5E8' + }, + groupTitle: { + color: isIOS() ? '#2F343D' : '#54585E', + fontSize: isIOS() ? 22 : 15, + fontWeight: 'bold', + letterSpacing: 0.27, + flex: 1, + lineHeight: isIOS() ? 41 : 24 + }, + serverHeader: { + justifyContent: 'space-between' + }, + serverHeaderText: { + color: '#9EA2A8', + fontSize: 15, + fontWeight: 'normal', + marginLeft: 15 + }, + serverHeaderAdd: { + color: isIOS() ? '#1D74F5' : '#FFF', + fontSize: 15, + fontWeight: 'normal', + marginRight: 15 + }, + serverItem: { + height: 68 + }, + serverItemContainer: { + flexDirection: 'row', + alignItems: 'center' + }, + serverIcon: { + width: 42, + height: 42, + marginHorizontal: 15, + marginVertical: 13, + borderRadius: 4, + resizeMode: 'contain' + }, + serverTextContainer: { + flex: 1, + flexDirection: 'column', + justifyContent: 'center' + }, + serverName: { + fontSize: 18, fontWeight: '600', color: '#0C0D0F' + }, + serverUrl: { + fontSize: 15, + color: '#9EA2A8' + }, + checkIcon: { + width: 20, + height: 20, + marginHorizontal: 15, + resizeMode: 'contain' + }, + serverSeparator: { + height: StyleSheet.hairlineWidth, + backgroundColor: '#E1E5E8', + marginLeft: 72 } }); diff --git a/app/views/SelectedUsersView.js b/app/views/SelectedUsersView.js index 4aca98c56..beb94b16d 100644 --- a/app/views/SelectedUsersView.js +++ b/app/views/SelectedUsersView.js @@ -6,7 +6,7 @@ import { connect } from 'react-redux'; import { addUser, removeUser, reset, setLoading } from '../actions/selectedUsers'; import database from '../lib/realm'; import RocketChat from '../lib/rocketchat'; -import RoomItem from '../presentation/RoomItem'; +import UserItem from '../presentation/UserItem'; import Avatar from '../containers/Avatar'; import Loading from '../containers/Loading'; import debounce from '../utils/debounce'; @@ -48,19 +48,14 @@ const styles = StyleSheet.create({ justifyContent: 'center', alignItems: 'center' }, - status: { - bottom: -2, - right: -2, - borderWidth: 2, - borderRadius: 12, - width: 12, - height: 12 + separator: { + height: StyleSheet.hairlineWidth, + backgroundColor: '#E1E5E8', + marginLeft: 60 } }); @connect(state => ({ - userId: state.login.user && state.login.user.id, - Site_Url: state.settings.Site_Url, users: state.selectedUsers.users, loading: state.selectedUsers.loading }), dispatch => ({ @@ -75,8 +70,6 @@ export default class SelectedUsersView extends LoggedView { navigator: PropTypes.object, rid: PropTypes.string, nextAction: PropTypes.string.isRequired, - userId: PropTypes.string, - Site_Url: PropTypes.string, addUser: PropTypes.func.isRequired, removeUser: PropTypes.func.isRequired, reset: PropTypes.func.isRequired, @@ -270,20 +263,18 @@ export default class SelectedUsersView extends LoggedView { ); + + renderSeparator = () => ; + renderItem = ({ item }) => ( - this._onPressItem(item._id, item)} - id={item.rid.replace(this.props.userId, '').trim()} - showLastMessage={false} - avatarSize={30} - statusStyle={styles.status} testID={`select-users-view-item-${ item.name }`} /> - ); + ) + renderList = () => ( 0 ? this.state.search : this.data} @@ -292,6 +283,7 @@ export default class SelectedUsersView extends LoggedView { style={styles.list} renderItem={this.renderItem} ListHeaderComponent={this.renderHeader} + ItemSeparatorComponent={this.renderSeparator} enableEmptySections keyboardShouldPersistTaps='always' /> diff --git a/app/views/SettingsView/index.js b/app/views/SettingsView/index.js index e0afa28b4..bf3b06919 100644 --- a/app/views/SettingsView/index.js +++ b/app/views/SettingsView/index.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { View, ScrollView, SafeAreaView, Platform } from 'react-native'; +import { View, ScrollView, SafeAreaView, Platform, Dimensions } from 'react-native'; import RNPickerSelect from 'react-native-picker-select'; import { connect } from 'react-redux'; @@ -16,7 +16,6 @@ import Loading from '../../containers/Loading'; import { showErrorAlert, showToast } from '../../utils/info'; import log from '../../utils/log'; import { setUser } from '../../actions/login'; -import { iconsMap } from '../../Icons'; @connect(state => ({ userLanguage: state.login.user && state.login.user.language @@ -52,7 +51,7 @@ export default class SettingsView extends LoggedView { this.props.navigator.setButtons({ leftButtons: [{ id: 'sideMenu', - icon: Platform.OS === 'ios' ? iconsMap.menu : undefined + icon: { uri: 'settings', scale: Dimensions.get('window').scale } }] }); } @@ -68,9 +67,7 @@ export default class SettingsView extends LoggedView { if (event.type === 'NavBarButtonPress') { if (event.id === 'sideMenu' && Platform.OS === 'ios') { this.props.navigator.toggleDrawer({ - side: 'left', - animated: true, - to: 'missing' + side: 'left' }); } } diff --git a/app/views/TermsServiceView.js b/app/views/TermsServiceView.js index aa906de63..1b7f1e6b1 100644 --- a/app/views/TermsServiceView.js +++ b/app/views/TermsServiceView.js @@ -4,15 +4,21 @@ import { WebView, SafeAreaView } from 'react-native'; import { connect } from 'react-redux'; import styles from './Styles'; +import LoggedView from './View'; @connect(state => ({ termsService: state.settings.Layout_Terms_of_Service })) -export default class TermsServiceView extends React.PureComponent { +/** @extends React.Component */ +export default class TermsServiceView extends LoggedView { static propTypes = { termsService: PropTypes.string } + constructor(props) { + super('TermsServiceView', props); + } + render() { return ( diff --git a/app/views/View.js b/app/views/View.js index 34920d229..ae0a04490 100644 --- a/app/views/View.js +++ b/app/views/View.js @@ -1,10 +1,18 @@ import React from 'react'; +import { Platform } from 'react-native'; import PropTypes from 'prop-types'; import { Answers } from 'react-native-fabric'; import { NavigationActions } from '../Navigation'; +const isAndroid = () => Platform.OS === 'android'; + /** @extends React.Component */ export default class extends React.Component { + static navigatorStyle = { + navBarBackgroundColor: isAndroid() ? '#2F343D' : undefined, + navBarTextColor: isAndroid() ? '#FFF' : undefined, + navBarButtonColor: isAndroid() ? '#FFF' : undefined + } static propTypes = { navigator: PropTypes.object } diff --git a/app/views/index.js b/app/views/index.js index 1370a01dd..1b47ee6cf 100644 --- a/app/views/index.js +++ b/app/views/index.js @@ -18,6 +18,7 @@ import RoomFilesView from './RoomFilesView'; import RoomInfoEditView from './RoomInfoEditView'; import RoomInfoView from './RoomInfoView'; import RoomMembersView from './RoomMembersView'; +import RoomsListHeaderView from './RoomsListView/Header'; import RoomsListSearchView from './RoomsListView/Search'; import RoomsListView from './RoomsListView'; import RoomView from './RoomView'; @@ -47,6 +48,7 @@ export const registerScreens = (store) => { Navigation.registerComponent('RoomInfoEditView', () => RoomInfoEditView, store, Provider); Navigation.registerComponent('RoomInfoView', () => RoomInfoView, store, Provider); Navigation.registerComponent('RoomMembersView', () => RoomMembersView, store, Provider); + Navigation.registerComponent('RoomsListHeaderView', () => RoomsListHeaderView, store, Provider); Navigation.registerComponent('RoomsListSearchView', () => RoomsListSearchView, store, Provider); Navigation.registerComponent('RoomsListView', () => RoomsListView, store, Provider); Navigation.registerComponent('RoomView', () => RoomView, store, Provider); diff --git a/e2e/05-roomslist.spec.js b/e2e/05-roomslist.spec.js index c0281d4b3..645e35933 100644 --- a/e2e/05-roomslist.spec.js +++ b/e2e/05-roomslist.spec.js @@ -6,10 +6,6 @@ const { login, navigateToLogin, tapBack } = require('./helpers/app'); const data = require('./data'); describe('Rooms list screen', () => { - // before(async() => { - // await device.reloadReactNative(); // TODO: remove this after fix logout subscription - // }); - describe('Render', async() => { it('should have rooms list screen', async() => { await expect(element(by.id('rooms-list-view'))).toBeVisible(); @@ -64,11 +60,11 @@ describe('Rooms list screen', () => { // Usage - Sidebar describe('Sidebar', async() => { it('should navigate to add server', async() => { - await element(by.id('rooms-list-view-sidebar')).tap(); - await waitFor(element(by.id('sidebar'))).toBeVisible().withTimeout(2000); - await element(by.id('sidebar-toggle-server')).tap(); - await waitFor(element(by.id('sidebar-add-server'))).toBeVisible().withTimeout(2000); - await element(by.id('sidebar-add-server')).tap(); + await element(by.id('rooms-list-header-server-dropdown-button')).tap(); + await waitFor(element(by.id('rooms-list-header-server-dropdown'))).toBeVisible().withTimeout(2000); + await expect(element(by.id('rooms-list-header-server-dropdown'))).toBeVisible(); + await expect(element(by.id('rooms-list-header-server-add'))).toBeVisible(); + await element(by.id('rooms-list-header-server-add')).tap(); await waitFor(element(by.id('new-server-view'))).toBeVisible().withTimeout(2000); await expect(element(by.id('new-server-view'))).toBeVisible(); await element(by.text('Close')).tap(); @@ -93,6 +89,6 @@ describe('Rooms list screen', () => { after(async() => { await navigateToLogin(); await login(); - }) + }); }); }); diff --git a/e2e/06-createroom.spec.js b/e2e/06-createroom.spec.js index ffa510e3b..19d153548 100644 --- a/e2e/06-createroom.spec.js +++ b/e2e/06-createroom.spec.js @@ -7,7 +7,6 @@ const { tapBack } = require('./helpers/app'); describe('Create room screen', () => { before(async() => { - // await device.reloadReactNative(); // TODO: remove this after fix logout subscription await element(by.id('rooms-list-view-create-channel')).tap(); await waitFor(element(by.id('select-users-view'))).toBeVisible().withTimeout(2000); }); diff --git a/e2e/10-changeserver.spec.js b/e2e/10-changeserver.spec.js index fd13d61c1..5368cc61d 100644 --- a/e2e/10-changeserver.spec.js +++ b/e2e/10-changeserver.spec.js @@ -12,11 +12,9 @@ describe('Change server', () => { it('should add server and create new user', async() => { // Navigate to add server - await element(by.id('rooms-list-view-sidebar')).tap(); - await waitFor(element(by.id('sidebar'))).toBeVisible().withTimeout(2000); - await element(by.id('sidebar-toggle-server')).tap(); - await waitFor(element(by.id('sidebar-add-server'))).toBeVisible().withTimeout(2000); - await element(by.id('sidebar-add-server')).tap(); + await element(by.id('rooms-list-header-server-dropdown-button')).tap(); + await waitFor(element(by.id('rooms-list-header-server-dropdown'))).toBeVisible().withTimeout(2000); + await element(by.id('rooms-list-header-server-add')).tap(); // Add server await waitFor(element(by.id('new-server-view'))).toBeVisible().withTimeout(60000); await element(by.id('new-server-view-input')).replaceText(data.alternateServer); @@ -43,15 +41,10 @@ describe('Change server', () => { }); it('should change server', async() => { - await element(by.id('rooms-list-view-sidebar')).tap(); - await waitFor(element(by.id('sidebar'))).toBeVisible().withTimeout(2000); - await element(by.id('sidebar-toggle-server')).tap(); - await waitFor(element(by.id(`sidebar-${ data.server }`))).toBeVisible().withTimeout(2000); - // await expect(element(by.id(`sidebar-${ data.server }`))).toBeVisible(); - await element(by.id(`sidebar-${ data.server }`)).tap(); + await element(by.id('rooms-list-header-server-dropdown-button')).tap(); + await waitFor(element(by.id('rooms-list-header-server-dropdown'))).toBeVisible().withTimeout(2000); + await element(by.id(`rooms-list-header-server-${ data.server }`)).tap(); await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(10000); - // await waitFor(element(by.id('rooms-list-view-sidebar').and(by.label(`Connected to ${ data.server }. Tap to view servers list.`)))).toBeVisible().withTimeout(60000); - // await expect(element(by.id('rooms-list-view-sidebar'))).toHaveLabel(`Connected to ${ data.server }. Tap to view servers list.`); // For a sanity test, to make sure roomslist is showing correct rooms // app MUST show public room created on previous tests await waitFor(element(by.id(`rooms-list-view-item-public${ data.random }`))).toBeVisible().withTimeout(60000); diff --git a/e2e/11-broadcast.spec.js b/e2e/11-broadcast.spec.js index bdc93d7f6..d959e539c 100644 --- a/e2e/11-broadcast.spec.js +++ b/e2e/11-broadcast.spec.js @@ -60,7 +60,7 @@ describe('Broadcast room', () => { await element(by.id('login-view-password')).replaceText(data.alternateUserPassword); await element(by.id('login-view-submit')).tap(); await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(10000); - await device.reloadReactNative(); // remove after fix logout + // await device.reloadReactNative(); // remove after fix logout await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(10000); await waitFor(element(by.id(`rooms-list-view-item-broadcast${ data.random }`))).toBeVisible().withTimeout(60000); await expect(element(by.id(`rooms-list-view-item-broadcast${ data.random }`))).toBeVisible(); diff --git a/ios/RocketChatRN/Images.xcassets/Icons/Contents.json b/ios/RocketChatRN/Images.xcassets/Icons/Contents.json new file mode 100644 index 000000000..da4a164c9 --- /dev/null +++ b/ios/RocketChatRN/Images.xcassets/Icons/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/RocketChatRN/Images.xcassets/Icons/check.imageset/Contents.json b/ios/RocketChatRN/Images.xcassets/Icons/check.imageset/Contents.json new file mode 100644 index 000000000..4e73a4191 --- /dev/null +++ b/ios/RocketChatRN/Images.xcassets/Icons/check.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "check.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "check@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "check@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/RocketChatRN/Images.xcassets/Icons/check.imageset/check.png b/ios/RocketChatRN/Images.xcassets/Icons/check.imageset/check.png new file mode 100644 index 000000000..b02785007 Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/check.imageset/check.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/check.imageset/check@2x.png b/ios/RocketChatRN/Images.xcassets/Icons/check.imageset/check@2x.png new file mode 100644 index 000000000..6f20b37a3 Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/check.imageset/check@2x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/check.imageset/check@3x.png b/ios/RocketChatRN/Images.xcassets/Icons/check.imageset/check@3x.png new file mode 100644 index 000000000..83186d0b9 Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/check.imageset/check@3x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/disclosure_indicator.imageset/Contents.json b/ios/RocketChatRN/Images.xcassets/Icons/disclosure_indicator.imageset/Contents.json new file mode 100644 index 000000000..b5adb786c --- /dev/null +++ b/ios/RocketChatRN/Images.xcassets/Icons/disclosure_indicator.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "disclosure_indicator.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "disclosure_indicator@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "disclosure_indicator@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/RocketChatRN/Images.xcassets/Icons/disclosure_indicator.imageset/disclosure_indicator.png b/ios/RocketChatRN/Images.xcassets/Icons/disclosure_indicator.imageset/disclosure_indicator.png new file mode 100644 index 000000000..42caa0676 Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/disclosure_indicator.imageset/disclosure_indicator.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/disclosure_indicator.imageset/disclosure_indicator@2x.png b/ios/RocketChatRN/Images.xcassets/Icons/disclosure_indicator.imageset/disclosure_indicator@2x.png new file mode 100644 index 000000000..585d4a797 Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/disclosure_indicator.imageset/disclosure_indicator@2x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/disclosure_indicator.imageset/disclosure_indicator@3x.png b/ios/RocketChatRN/Images.xcassets/Icons/disclosure_indicator.imageset/disclosure_indicator@3x.png new file mode 100644 index 000000000..3c8634648 Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/disclosure_indicator.imageset/disclosure_indicator@3x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/disclosure_indicator_server.imageset/Contents.json b/ios/RocketChatRN/Images.xcassets/Icons/disclosure_indicator_server.imageset/Contents.json new file mode 100644 index 000000000..4443a947f --- /dev/null +++ b/ios/RocketChatRN/Images.xcassets/Icons/disclosure_indicator_server.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "disclosure_indicator_server.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "disclosure_indicator_server@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "disclosure_indicator_server@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/RocketChatRN/Images.xcassets/Icons/disclosure_indicator_server.imageset/disclosure_indicator_server.png b/ios/RocketChatRN/Images.xcassets/Icons/disclosure_indicator_server.imageset/disclosure_indicator_server.png new file mode 100644 index 000000000..82612918b Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/disclosure_indicator_server.imageset/disclosure_indicator_server.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/disclosure_indicator_server.imageset/disclosure_indicator_server@2x.png b/ios/RocketChatRN/Images.xcassets/Icons/disclosure_indicator_server.imageset/disclosure_indicator_server@2x.png new file mode 100644 index 000000000..d46f9df03 Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/disclosure_indicator_server.imageset/disclosure_indicator_server@2x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/disclosure_indicator_server.imageset/disclosure_indicator_server@3x.png b/ios/RocketChatRN/Images.xcassets/Icons/disclosure_indicator_server.imageset/disclosure_indicator_server@3x.png new file mode 100644 index 000000000..4e3a017db Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/disclosure_indicator_server.imageset/disclosure_indicator_server@3x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/group_favorites.imageset/Contents.json b/ios/RocketChatRN/Images.xcassets/Icons/group_favorites.imageset/Contents.json new file mode 100644 index 000000000..af5c4f287 --- /dev/null +++ b/ios/RocketChatRN/Images.xcassets/Icons/group_favorites.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "group_favorites.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "group_favorites@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "group_favorites@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/RocketChatRN/Images.xcassets/Icons/group_favorites.imageset/group_favorites.png b/ios/RocketChatRN/Images.xcassets/Icons/group_favorites.imageset/group_favorites.png new file mode 100644 index 000000000..d139ea4d1 Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/group_favorites.imageset/group_favorites.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/group_favorites.imageset/group_favorites@2x.png b/ios/RocketChatRN/Images.xcassets/Icons/group_favorites.imageset/group_favorites@2x.png new file mode 100644 index 000000000..359973c8c Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/group_favorites.imageset/group_favorites@2x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/group_favorites.imageset/group_favorites@3x.png b/ios/RocketChatRN/Images.xcassets/Icons/group_favorites.imageset/group_favorites@3x.png new file mode 100644 index 000000000..748eadccf Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/group_favorites.imageset/group_favorites@3x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/group_type.imageset/Contents.json b/ios/RocketChatRN/Images.xcassets/Icons/group_type.imageset/Contents.json new file mode 100644 index 000000000..0fb47c7b5 --- /dev/null +++ b/ios/RocketChatRN/Images.xcassets/Icons/group_type.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "group_type.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "group_type@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "group_type@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/RocketChatRN/Images.xcassets/Icons/group_type.imageset/group_type.png b/ios/RocketChatRN/Images.xcassets/Icons/group_type.imageset/group_type.png new file mode 100644 index 000000000..f1be38bce Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/group_type.imageset/group_type.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/group_type.imageset/group_type@2x.png b/ios/RocketChatRN/Images.xcassets/Icons/group_type.imageset/group_type@2x.png new file mode 100644 index 000000000..c0acc012d Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/group_type.imageset/group_type@2x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/group_type.imageset/group_type@3x.png b/ios/RocketChatRN/Images.xcassets/Icons/group_type.imageset/group_type@3x.png new file mode 100644 index 000000000..d92d228dd Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/group_type.imageset/group_type@3x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/group_unread.imageset/Contents.json b/ios/RocketChatRN/Images.xcassets/Icons/group_unread.imageset/Contents.json new file mode 100644 index 000000000..06fa3de27 --- /dev/null +++ b/ios/RocketChatRN/Images.xcassets/Icons/group_unread.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "group_unread.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "group_unread@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "group_unread@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/RocketChatRN/Images.xcassets/Icons/group_unread.imageset/group_unread.png b/ios/RocketChatRN/Images.xcassets/Icons/group_unread.imageset/group_unread.png new file mode 100644 index 000000000..5ea6d0f34 Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/group_unread.imageset/group_unread.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/group_unread.imageset/group_unread@2x.png b/ios/RocketChatRN/Images.xcassets/Icons/group_unread.imageset/group_unread@2x.png new file mode 100644 index 000000000..899c2863b Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/group_unread.imageset/group_unread@2x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/group_unread.imageset/group_unread@3x.png b/ios/RocketChatRN/Images.xcassets/Icons/group_unread.imageset/group_unread@3x.png new file mode 100644 index 000000000..e84f81f65 Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/group_unread.imageset/group_unread@3x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/logo.imageset/Contents.json b/ios/RocketChatRN/Images.xcassets/Icons/logo.imageset/Contents.json new file mode 100644 index 000000000..7d84a377f --- /dev/null +++ b/ios/RocketChatRN/Images.xcassets/Icons/logo.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "logo@1x.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "logo@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "logo@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/RocketChatRN/Images.xcassets/Icons/logo.imageset/logo@1x.png b/ios/RocketChatRN/Images.xcassets/Icons/logo.imageset/logo@1x.png new file mode 100644 index 000000000..6928d7b88 Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/logo.imageset/logo@1x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/logo.imageset/logo@2x.png b/ios/RocketChatRN/Images.xcassets/Icons/logo.imageset/logo@2x.png new file mode 100644 index 000000000..e4502f69c Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/logo.imageset/logo@2x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/logo.imageset/logo@3x.png b/ios/RocketChatRN/Images.xcassets/Icons/logo.imageset/logo@3x.png new file mode 100644 index 000000000..159d7d4a5 Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/logo.imageset/logo@3x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/new_channel.imageset/Contents.json b/ios/RocketChatRN/Images.xcassets/Icons/new_channel.imageset/Contents.json new file mode 100644 index 000000000..bc09b68e9 --- /dev/null +++ b/ios/RocketChatRN/Images.xcassets/Icons/new_channel.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "new_channel.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "new_channel@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "new_channel@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/RocketChatRN/Images.xcassets/Icons/new_channel.imageset/new_channel.png b/ios/RocketChatRN/Images.xcassets/Icons/new_channel.imageset/new_channel.png new file mode 100644 index 000000000..13de9017b Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/new_channel.imageset/new_channel.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/new_channel.imageset/new_channel@2x.png b/ios/RocketChatRN/Images.xcassets/Icons/new_channel.imageset/new_channel@2x.png new file mode 100644 index 000000000..59c53df8f Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/new_channel.imageset/new_channel@2x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/new_channel.imageset/new_channel@3x.png b/ios/RocketChatRN/Images.xcassets/Icons/new_channel.imageset/new_channel@3x.png new file mode 100644 index 000000000..bb31860ce Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/new_channel.imageset/new_channel@3x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/settings.imageset/Contents.json b/ios/RocketChatRN/Images.xcassets/Icons/settings.imageset/Contents.json new file mode 100644 index 000000000..a683f09c8 --- /dev/null +++ b/ios/RocketChatRN/Images.xcassets/Icons/settings.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "settings.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "settings@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "settings@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/RocketChatRN/Images.xcassets/Icons/settings.imageset/settings.png b/ios/RocketChatRN/Images.xcassets/Icons/settings.imageset/settings.png new file mode 100644 index 000000000..bdd68a2c4 Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/settings.imageset/settings.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/settings.imageset/settings@2x.png b/ios/RocketChatRN/Images.xcassets/Icons/settings.imageset/settings@2x.png new file mode 100644 index 000000000..310f465e4 Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/settings.imageset/settings@2x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/settings.imageset/settings@3x.png b/ios/RocketChatRN/Images.xcassets/Icons/settings.imageset/settings@3x.png new file mode 100644 index 000000000..c045eadee Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/settings.imageset/settings@3x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/sort_activity.imageset/Contents.json b/ios/RocketChatRN/Images.xcassets/Icons/sort_activity.imageset/Contents.json new file mode 100644 index 000000000..0409a6ff8 --- /dev/null +++ b/ios/RocketChatRN/Images.xcassets/Icons/sort_activity.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "sort_activity.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "sort_activity@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "sort_activity@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/RocketChatRN/Images.xcassets/Icons/sort_activity.imageset/sort_activity.png b/ios/RocketChatRN/Images.xcassets/Icons/sort_activity.imageset/sort_activity.png new file mode 100644 index 000000000..e64f442e5 Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/sort_activity.imageset/sort_activity.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/sort_activity.imageset/sort_activity@2x.png b/ios/RocketChatRN/Images.xcassets/Icons/sort_activity.imageset/sort_activity@2x.png new file mode 100644 index 000000000..533d1aa63 Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/sort_activity.imageset/sort_activity@2x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/sort_activity.imageset/sort_activity@3x.png b/ios/RocketChatRN/Images.xcassets/Icons/sort_activity.imageset/sort_activity@3x.png new file mode 100644 index 000000000..dac1d40e8 Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/sort_activity.imageset/sort_activity@3x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/sort_alphabetically.imageset/Contents.json b/ios/RocketChatRN/Images.xcassets/Icons/sort_alphabetically.imageset/Contents.json new file mode 100644 index 000000000..deac3a31a --- /dev/null +++ b/ios/RocketChatRN/Images.xcassets/Icons/sort_alphabetically.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "sort_alphabetically.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "sort_alphabetically@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "sort_alphabetically@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/RocketChatRN/Images.xcassets/Icons/sort_alphabetically.imageset/sort_alphabetically.png b/ios/RocketChatRN/Images.xcassets/Icons/sort_alphabetically.imageset/sort_alphabetically.png new file mode 100644 index 000000000..362ad237a Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/sort_alphabetically.imageset/sort_alphabetically.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/sort_alphabetically.imageset/sort_alphabetically@2x.png b/ios/RocketChatRN/Images.xcassets/Icons/sort_alphabetically.imageset/sort_alphabetically@2x.png new file mode 100644 index 000000000..367563110 Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/sort_alphabetically.imageset/sort_alphabetically@2x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/sort_alphabetically.imageset/sort_alphabetically@3x.png b/ios/RocketChatRN/Images.xcassets/Icons/sort_alphabetically.imageset/sort_alphabetically@3x.png new file mode 100644 index 000000000..2da108f0c Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/sort_alphabetically.imageset/sort_alphabetically@3x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/subscription_hashtag.imageset/Cell Subscription Hashtag.png b/ios/RocketChatRN/Images.xcassets/Icons/subscription_hashtag.imageset/Cell Subscription Hashtag.png new file mode 100644 index 000000000..749534051 Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/subscription_hashtag.imageset/Cell Subscription Hashtag.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/subscription_hashtag.imageset/Cell Subscription Hashtag@2x.png b/ios/RocketChatRN/Images.xcassets/Icons/subscription_hashtag.imageset/Cell Subscription Hashtag@2x.png new file mode 100644 index 000000000..56e7b8cbf Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/subscription_hashtag.imageset/Cell Subscription Hashtag@2x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/subscription_hashtag.imageset/Cell Subscription Hashtag@3x.png b/ios/RocketChatRN/Images.xcassets/Icons/subscription_hashtag.imageset/Cell Subscription Hashtag@3x.png new file mode 100644 index 000000000..59983e226 Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/subscription_hashtag.imageset/Cell Subscription Hashtag@3x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/subscription_hashtag.imageset/Contents.json b/ios/RocketChatRN/Images.xcassets/Icons/subscription_hashtag.imageset/Contents.json new file mode 100644 index 000000000..eac29d3ff --- /dev/null +++ b/ios/RocketChatRN/Images.xcassets/Icons/subscription_hashtag.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Cell Subscription Hashtag.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "Cell Subscription Hashtag@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "Cell Subscription Hashtag@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/RocketChatRN/Images.xcassets/Icons/subscription_lock.imageset/Cell Subscription Lock.png b/ios/RocketChatRN/Images.xcassets/Icons/subscription_lock.imageset/Cell Subscription Lock.png new file mode 100644 index 000000000..95368bae6 Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/subscription_lock.imageset/Cell Subscription Lock.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/subscription_lock.imageset/Cell Subscription Lock@2x.png b/ios/RocketChatRN/Images.xcassets/Icons/subscription_lock.imageset/Cell Subscription Lock@2x.png new file mode 100644 index 000000000..7a0dd92ce Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/subscription_lock.imageset/Cell Subscription Lock@2x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/subscription_lock.imageset/Cell Subscription Lock@3x.png b/ios/RocketChatRN/Images.xcassets/Icons/subscription_lock.imageset/Cell Subscription Lock@3x.png new file mode 100644 index 000000000..060a2b03a Binary files /dev/null and b/ios/RocketChatRN/Images.xcassets/Icons/subscription_lock.imageset/Cell Subscription Lock@3x.png differ diff --git a/ios/RocketChatRN/Images.xcassets/Icons/subscription_lock.imageset/Contents.json b/ios/RocketChatRN/Images.xcassets/Icons/subscription_lock.imageset/Contents.json new file mode 100644 index 000000000..148a6e731 --- /dev/null +++ b/ios/RocketChatRN/Images.xcassets/Icons/subscription_lock.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Cell Subscription Lock.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "Cell Subscription Lock@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "Cell Subscription Lock@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index a0f3e543b..7158b588c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15999,9 +15999,8 @@ } }, "react-native-navigation": { - "version": "1.1.479", - "resolved": "https://registry.npmjs.org/react-native-navigation/-/react-native-navigation-1.1.479.tgz", - "integrity": "sha512-0Qdr8ybkSbwr2RhaTWfonNMCbIyky0zDTJaN5RTr3y2uz4wFAySDANB64wK/8xNz7uscE8mObDC3gLHTMRdb2Q==", + "version": "git+https://github.com/RocketChat/react-native-navigation.git#1a428f14ddda77511676d0c6d863083ce6225e32", + "from": "git+https://github.com/RocketChat/react-native-navigation.git", "requires": { "lodash": "4.x.x" } diff --git a/package.json b/package.json index d75fbdf09..ffc2fed13 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "react-native-markdown-renderer": "^3.2.8", "react-native-meteor": "^1.4.0", "react-native-modal": "^6.5.0", - "react-native-navigation": "^1.1.479", + "react-native-navigation": "git+https://github.com/RocketChat/react-native-navigation.git", "react-native-notifications": "git+https://github.com/RocketChat/react-native-notifications.git", "react-native-optimized-flatlist": "^1.0.4", "react-native-picker-select": "^4.2.0",