Unverified Commit f9ccf380 authored by Diego Mello's avatar Diego Mello Committed by GitHub
Browse files

Merge beta into master (#2520)



* [FIX] Single message thread inserting thread without rid (#1999)

* [FIX] ThreadMessagesView crashing on load (#1997)

* [FIX] Saml (#1996)

* [FIX] SAML incorrect close

* [FIX] Pathname
Co-authored-by: default avatarDiego Mello <diegolmello@gmail.com>

* [FIX] Change user own status (#1995)

* [FIX] Change user own status

* [IMPROVEMENT] Set activeUsers
Co-authored-by: default avatarDiego Mello <diegolmello@gmail.com>

* [FIX] Loading all updated rooms after app resume (#1998)

* [FIX] Loading all updated rooms after app resume

* Fix room date on RoomItem
Co-authored-by: default avatarDiego Mello <diegolmello@gmail.com>

* [FIX] Change notifications preferences (#2000)

* [FIX] Change notifications preferences

* [IMPROVEMENT] Picker View

* [I18N] Translations

* [FIX] Picker Selection

* [FIX] List border

* [FIX] Prevent crash

* [FIX] Not-Pref tablet

* [FIX] Use same style of LanguageView

* [IMPROVEMENT] Send listItem title

Co-authored-by: Diego Mello <...
parent 6c37333d
......@@ -119,7 +119,7 @@ jobs:
- save_cache: *save-npm-cache-linux
# Android builds
android-build:
android-play-build:
<<: *defaults
docker:
- image: circleci/android:api-28-node
......@@ -150,7 +150,7 @@ jobs:
# echo -e "android.enableAapt2=false" >> ./gradle.properties
echo -e "android.useAndroidX=true" >> ./gradle.properties
echo -e "android.enableJetifier=true" >> ./gradle.properties
echo -e "FLIPPER_VERSION=0.33.1" >> ./gradle.properties
echo -e "FLIPPER_VERSION=0.51.0" >> ./gradle.properties
if [[ $KEYSTORE ]]; then
echo $KEYSTORE_BASE64 | base64 --decode > ./app/$KEYSTORE
......@@ -167,8 +167,10 @@ jobs:
- run:
name: Set Google Services
command: |
cp google-services.prod.json google-services.json
working_directory: android/app
if [[ $KEYSTORE ]]; then
echo $GOOGLE_SERVICES_ANDROID | base64 --decode > google-services.json
fi
working_directory: android/app/src/play
- run:
name: Config variables
......@@ -176,12 +178,12 @@ jobs:
echo -e "export default { BUGSNAG_API_KEY: '$BUGSNAG_KEY' };" > ./config.js
- run:
name: Build Android App
name: Build Android Play App
command: |
if [[ $KEYSTORE ]]; then
bundle exec fastlane android release
bundle exec fastlane android playRelease
else
bundle exec fastlane android build
bundle exec fastlane android playBuild
fi
working_directory: android
......@@ -192,8 +194,8 @@ jobs:
yarn generate-source-maps-android upload \
--api-key=$BUGSNAG_KEY \
--app-version=$CIRCLE_BUILD_NUM \
--minifiedFile=android/app/build/generated/assets/react/release/app.bundle \
--source-map=android/app/build/generated/sourcemaps/react/release/app.bundle.map \
--minifiedFile=android/app/build/generated/assets/react/play/release/app.bundle \
--source-map=android/app/build/generated/sourcemaps/react/play/release/app.bundle.map \
--minified-url=app.bundle \
--upload-sources
fi
......@@ -211,7 +213,68 @@ jobs:
- android/fastlane/report.xml
- android/app/build/outputs
android-google-play-alpha:
android-foss-build:
<<: *defaults
docker:
- image: circleci/android:api-28-node
environment:
JAVA_OPTS: '-Xms512m -Xmx2g'
GRADLE_OPTS: '-Xmx3g -Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-Xmx2g -XX:+HeapDumpOnOutOfMemoryError"'
TERM: dumb
<<: *bash-env
steps:
- checkout
- run: *install-node
- restore_cache: *restore-npm-cache-linux
- run: *install-npm-modules
- run: *update-fastlane-android
- restore_cache: *restore-gradle-cache
- run:
name: Configure Gradle
command: |
echo -e "" > ./gradle.properties
# echo -e "android.enableAapt2=false" >> ./gradle.properties
echo -e "android.useAndroidX=true" >> ./gradle.properties
echo -e "android.enableJetifier=true" >> ./gradle.properties
echo -e "FLIPPER_VERSION=0.51.0" >> ./gradle.properties
echo -e "VERSIONCODE=$CIRCLE_BUILD_NUM" >> ./gradle.properties
if [[ $KEYSTORE ]]; then
echo $KEYSTORE_BASE64 | base64 --decode > ./app/$KEYSTORE
echo -e "KEYSTORE=$KEYSTORE" >> ./gradle.properties
echo -e "KEYSTORE_PASSWORD=$KEYSTORE_PASSWORD" >> ./gradle.properties
echo -e "KEY_ALIAS=$KEY_ALIAS" >> ./gradle.properties
echo -e "KEY_PASSWORD=$KEYSTORE_PASSWORD" >> ./gradle.properties
fi
working_directory: android
- run:
name: Build Android Foss App
command: bundle exec fastlane android fossRelease
working_directory: android
- store_artifacts:
path: android/app/build/outputs
- save_cache: *save-npm-cache-linux
- save_cache: *save-gradle-cache
- persist_to_workspace:
root: .
paths:
- android/fastlane/report.xml
- android/app/build/outputs
android-google-play-beta:
<<: *defaults
docker:
- image: circleci/android:api-28-node
......@@ -231,7 +294,7 @@ jobs:
- run:
name: Fastlane Play Store Upload
command: bundle exec fastlane android alpha
command: bundle exec fastlane android beta
working_directory: android
# iOS builds
......@@ -254,7 +317,9 @@ jobs:
- run:
name: Set Google Services
command: |
cp GoogleService-Info.prod.plist GoogleService-Info.plist
if [[ $KEYSTORE ]]; then
echo $GOOGLE_SERVICES_REACTNATIVE | base64 --decode > GoogleService-Info.plist
fi
working_directory: ios
- run:
......@@ -337,13 +402,20 @@ workflows:
requires:
- ios-hold-testflight
- android-build:
- android-play-build:
requires:
- lint-testunit
- android-hold-google-play-alpha:
- android-hold-google-play-beta:
type: approval
requires:
- android-build
- android-google-play-alpha:
- android-play-build
- android-google-play-beta:
requires:
- android-hold-google-play-beta
- android-hold-foss-build:
type: approval
requires:
- lint-testunit
- android-foss-build:
requires:
- android-hold-google-play-alpha
- android-hold-foss-build
- Your Rocket.Chat Experimental app version: ####
- Your Rocket.Chat server version: ####
- Device (or Simulator) you're running with: ####
<!--
**The app isn't connecting to your server?**
Make sure your server supports WebSocket. These are the minimum requirements for Apache 2.4 and Nginx 1.3 or greater.
Please see our guide for opening issues: https://rocket.chat/docs/contributing/reporting-issues
If you have questions or are looking for help/support please see: https://rocket.chat/docs/getting-support
If you are experiencing a bug please search our issues to be sure it is not already present: https://github.com/RocketChat/Rocket.Chat.ReactNative/issues
-->
### Description:
<!-- A clear and concise description of what the bug is. -->
### Environment Information:
- Rocket.Chat Server Version:
- Rocket.Chat App Version:
- Device Name:
- OS Version:
### Steps to reproduce:
1. <!-- Go to '...' -->
2. <!-- Click on '....' -->
3. <!-- and so on... -->
### Expected behavior:
<!-- What you expect to happen -->
### Actual behavior:
<!-- What actually happens with SCREENSHOT, if applicable -->
### Additional context:
<!-- Add any other context about the problem here. -->
......@@ -20,19 +20,23 @@ yarn
Run the app:
```sh
npx react-native run-ios
yarn ios
```
or
```sh
npx react-native run-android
yarn android
```
At this point, the app should be running on the simulator or on your device!
*Note: npm won't work on this project*
### How to inspect the app
We use [Reactotron](https://github.com/infinitered/reactotron) to inspect logs, redux state, redux-sagas, HTTP requests, etc.
## Issues needing help
Didn't find a bug or want a new feature not already reported? Check out the [help wanted](https://github.com/RocketChat/Rocket.Chat.ReactNative/issues?q=is%3Aissue+is%3Aopen+label%3A%22%F0%9F%91%8B+help+wanted%22) or the [good first issue](https://github.com/RocketChat/Rocket.Chat.ReactNative/issues?q=is%3Aissue+is%3Aopen+label%3A%22%F0%9F%8D%AD+good+first+issue%22) labels.
......
export default {
BuildConfigs: null
};
......@@ -3333,6 +3333,165 @@ exports[`Storyshots Message list message 1`] = `
>
Edited
</Text>
<Text
style={
Array [
Object {
"fontSize": 20,
"fontWeight": "300",
"marginLeft": 10,
"marginVertical": 30,
},
Object {
"color": "#0d0e12",
},
Object {
"marginBottom": 0,
"marginTop": 30,
},
]
}
>
Encrypted
</Text>
<View>
<View
style={
Array [
Object {
"flexDirection": "column",
"paddingHorizontal": 14,
"paddingVertical": 4,
"width": "100%",
},
undefined,
]
}
>
<View
style={
Object {
"flexDirection": "row",
}
}
>
<View
style={
Array [
Object {
"borderRadius": 4,
"height": 36,
"width": 36,
},
Object {
"marginTop": 4,
},
]
}
/>
<View
style={
Array [
Object {
"flex": 1,
"marginLeft": 46,
},
Object {
"marginLeft": 10,
},
]
}
>
<View
style={
Object {
"alignItems": "center",
"flex": 1,
"flexDirection": "row",
}
}
>
<Text
style={
Array [
Object {
"backgroundColor": "transparent",
"fontFamily": "System",
"fontSize": 12,
"fontWeight": "300",
"lineHeight": 22,
"paddingLeft": 10,
},
Object {
"color": "#9ca2a8",
},
]
}
>
10:00 AM
</Text>
</View>
<View>
<View
style={
Object {
"flexDirection": "row",
}
}
>
<View
style={
Object {
"flex": 1,
}
}
>
<Text
numberOfLines={0}
style={
Array [
undefined,
Object {
"color": "#2f343d",
},
]
}
>
<Text
accessibilityLabel="This message has error and is encrypted"
numberOfLines={0}
style={
Array [
Object {
"backgroundColor": "transparent",
"fontFamily": "System",
"fontSize": 16,
"fontWeight": "400",
},
Array [
Object {},
Object {
"alignItems": "flex-start",
"flexDirection": "row",
"flexWrap": "wrap",
"justifyContent": "flex-start",
"marginBottom": 0,
"marginTop": 0,
},
],
]
}
>
This message has error and is encrypted
</Text>
</Text>
</View>
</View>
</View>
</View>
</View>
</View>
</View>
<Text
style={
Array [
......
......@@ -81,7 +81,6 @@ GEM
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
fastlane-plugin-appcenter (1.8.0)
gh_inspector (1.1.3)
google-api-client (0.36.4)
addressable (~> 2.5, >= 2.5.1)
......@@ -156,6 +155,7 @@ GEM
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.7)
unf_ext (0.0.7.7-x64-mingw32)
unicode-display_width (1.7.0)
word_wrap (1.0.0)
......@@ -171,11 +171,11 @@ GEM
xcpretty (~> 0.2, >= 0.0.7)
PLATFORMS
ruby
x64-mingw32
DEPENDENCIES
fastlane
fastlane-plugin-appcenter
BUNDLED WITH
2.0.2
def taskRequests = getGradle().getStartParameter().getTaskRequests().toString().toLowerCase()
def isPlay = !taskRequests.contains("foss")
apply plugin: "com.android.application"
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'kotlin-android'
apply plugin: 'com.bugsnag.android.gradle'
if (isPlay) {
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'com.bugsnag.android.gradle'
}
import com.android.build.OutputFile
......@@ -139,9 +144,11 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode VERSIONCODE as Integer
versionName "4.10.0"
versionName "4.11.0"
vectorDrawables.useSupportLibrary = true
manifestPlaceholders = [BugsnagAPIKey: BugsnagAPIKey as String]
if (isPlay) {
manifestPlaceholders = [BugsnagAPIKey: BugsnagAPIKey as String]
}
missingDimensionStrategy "RNNotifications.reactNativeVersion", "reactNative60" // See note below!
}
......@@ -168,8 +175,10 @@ android {
minifyEnabled enableProguardInReleaseBuilds
setProguardFiles([getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'])
signingConfig signingConfigs.release
firebaseCrashlytics {
nativeSymbolUploadEnabled true
if (isPlay) {
firebaseCrashlytics {
nativeSymbolUploadEnabled true
}
}
}
}
......@@ -182,6 +191,19 @@ android {
// }
// applicationVariants are e.g. debug, release
flavorDimensions "type"
productFlavors {
foss {
dimension = "type"
buildConfigField "boolean", "FDROID_BUILD", "true"
}
play {
dimension = "type"
buildConfigField "boolean", "FDROID_BUILD", "false"
}
}
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
......@@ -217,7 +239,7 @@ dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules
implementation "com.google.firebase:firebase-messaging:18.0.0"
playImplementation "com.google.firebase:firebase-messaging:18.0.0"
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni'
......@@ -240,6 +262,7 @@ dependencies {
implementation "com.google.code.gson:gson:2.8.5"
implementation "com.github.bumptech.glide:glide:4.9.0"
annotationProcessor "com.github.bumptech.glide:compiler:4.9.0"
implementation "com.tencent:mmkv-static:1.2.1"
}
// Run this once to be able to run the application with BUCK
......@@ -249,4 +272,7 @@ task copyDownloadableDepsToLibs(type: Copy) {
into 'libs'
}
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
\ No newline at end of file
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
if (isPlay) {
apply plugin: 'com.google.gms.google-services'
}
{
"project_info": {
"project_number": "673693445664",
"firebase_url": "https://rocketchat-9e9be.firebaseio.com",
"project_id": "rocketchat-9e9be",
"storage_bucket": "rocketchat-9e9be.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:673693445664:android:6ef4638e500ec958",
"android_client_info": {
"package_name": "RocketChat"
}
},
"oauth_client": [
{
"client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDIkZj1TRz8TmhnMswDwVY5OnWuzFK3rxg"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-jbf9m30ta163gobjfp0v7j1v7kpo7kmv.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "chat.rocket.reactnative"
}
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:673693445664:android:16da2e50aff9f0c9",
"android_client_info": {
"package_name": "chat.rocket.android"
}
},
"oauth_client": [
{
"client_id": "673693445664-k0mvosdjoe5dbvqce3b377ckabb5dgu8.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "chat.rocket.android",
"certificate_hash": "33fa8582794176014a59054192e261bfad0e5273"
}
},
{
"client_id": "673693445664-hrjftksij02vqtd467ln2cubvu48ft5j.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "chat.rocket.android",
"certificate_hash": "41cf750df786a6d9da712a98a629d0c8391876d6"
}
},
{
"client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDIkZj1TRz8TmhnMswDwVY5OnWuzFK3rxg"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-jbf9m30ta163gobjfp0v7j1v7kpo7kmv.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "chat.rocket.reactnative"
}
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:673693445664:android:1551054db195f705",
"android_client_info": {
"package_name": "chat.rocket.android.dev"
}