diff --git a/.circleci/config.yml b/.circleci/config.yml index 3e3a66b87..182e64339 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -290,6 +290,24 @@ commands: command: bundle exec fastlane android beta official:<< parameters.official >> working_directory: android + # EXPERIMENTAL ONLY + # No plans to do it for Official + upload-to-google-play-production: + description: "Upload to Google Play production" + steps: + - checkout + - attach_workspace: + at: android + - run: + name: Store the google service account key + command: echo "$FASTLANE_GOOGLE_SERVICE_ACCOUNT" | base64 --decode > service_account.json + working_directory: android + - run: *update-fastlane-android + - run: + name: Fastlane Play Store Upload + command: bundle exec fastlane android production + working_directory: android + upload-to-testflight: description: "Upload to TestFlight" parameters: @@ -382,6 +400,13 @@ jobs: - upload-to-google-play-beta: official: false + android-google-play-production-experimental: + <<: *defaults + docker: + - image: circleci/android:api-28-node + steps: + - upload-to-google-play-production + android-google-play-beta-official: <<: *defaults docker: @@ -466,6 +491,13 @@ workflows: - android-google-play-beta-experimental: requires: - android-hold-google-play-beta-experimental + - android-hold-google-play-production-experimental: + type: approval + requires: + - android-build-experimental + - android-google-play-production-experimental: + requires: + - android-hold-google-play-production-experimental # Android Official - android-hold-build-official: diff --git a/android/app/build.gradle b/android/app/build.gradle index 44b3bb150..8e55d11da 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -144,7 +144,7 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode VERSIONCODE as Integer - versionName "4.16.0" + versionName "4.16.1" vectorDrawables.useSupportLibrary = true if (!isFoss) { manifestPlaceholders = [BugsnagAPIKey: BugsnagAPIKey as String] diff --git a/android/fastlane/Fastfile b/android/fastlane/Fastfile index 1ac6d1fa7..a1c5bd70c 100644 --- a/android/fastlane/Fastfile +++ b/android/fastlane/Fastfile @@ -32,4 +32,13 @@ platform :android do ) end end + + desc "Upload App to Play Store Production" + lane :production do |options| + upload_to_play_store( + package_name: 'chat.rocket.reactnative', + track: 'production', + aab: 'android/app/build/outputs/bundle/experimentalPlayRelease/app-experimental-play-release.aab' + ) + end end diff --git a/app/containers/RoomHeader/RoomHeader.js b/app/containers/RoomHeader/RoomHeader.js index 6715fc137..0f1ee472e 100644 --- a/app/containers/RoomHeader/RoomHeader.js +++ b/app/containers/RoomHeader/RoomHeader.js @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useCallback } from 'react'; import PropTypes from 'prop-types'; import { View, Text, StyleSheet, TouchableOpacity @@ -149,11 +149,13 @@ const Header = React.memo(({ ); } + const handleOnPress = useCallback(() => onPress(), []); + return ( { return; } // server uses lowercase pattern (pt-br), but we're forced to use standard pattern (pt-BR) - const locale = LANGUAGES.find(ll => ll.value.toLowerCase() === l.toLowerCase())?.value; + let locale = LANGUAGES.find(ll => ll.value.toLowerCase() === l.toLowerCase())?.value; + if (!locale) { + locale = 'en'; + } // don't go forward if it's the same language and default language (en) was setup already if (i18n.locale === locale && i18n.translations?.en) { return; } i18n.locale = locale; - i18n.translations = { ...i18n.translations, [locale]: translations[locale]() }; + i18n.translations = { ...i18n.translations, [locale]: translations[locale]?.() }; I18nManager.forceRTL(isRTL(locale)); I18nManager.swapLeftAndRightInRTL(isRTL(locale)); i18n.isRTL = I18nManager.isRTL; diff --git a/app/views/AuthenticationWebView.js b/app/views/AuthenticationWebView.js index b21c85bba..99978b7d7 100644 --- a/app/views/AuthenticationWebView.js +++ b/app/views/AuthenticationWebView.js @@ -88,8 +88,8 @@ class AuthenticationWebView extends React.PureComponent { this.dismiss(); } - // eslint-disable-next-line react/sort-comp - debouncedLogin = debounce(params => this.login(params), 3000, true); + // Force 3s delay so the server has time to evaluate the token + debouncedLogin = debounce(params => this.login(params), 3000); tryLogin = debounce(async() => { const { Accounts_Iframe_api_url, Accounts_Iframe_api_method } = this.props; diff --git a/ios/RocketChatRN.xcodeproj/project.pbxproj b/ios/RocketChatRN.xcodeproj/project.pbxproj index 3d7bd4dda..07bb1935c 100644 --- a/ios/RocketChatRN.xcodeproj/project.pbxproj +++ b/ios/RocketChatRN.xcodeproj/project.pbxproj @@ -1691,7 +1691,7 @@ INFOPLIST_FILE = NotificationService/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 4.16.0; + MARKETING_VERSION = 4.16.1; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = chat.rocket.reactnative.NotificationService; @@ -1728,7 +1728,7 @@ INFOPLIST_FILE = NotificationService/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 4.16.0; + MARKETING_VERSION = 4.16.1; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = chat.rocket.reactnative.NotificationService; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/ios/RocketChatRN/Info.plist b/ios/RocketChatRN/Info.plist index d8b121b13..dd599d645 100644 --- a/ios/RocketChatRN/Info.plist +++ b/ios/RocketChatRN/Info.plist @@ -23,7 +23,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 4.16.0 + 4.16.1 CFBundleSignature ???? CFBundleURLTypes diff --git a/ios/ShareRocketChatRN/Info.plist b/ios/ShareRocketChatRN/Info.plist index c4c44690d..2f523baaa 100644 --- a/ios/ShareRocketChatRN/Info.plist +++ b/ios/ShareRocketChatRN/Info.plist @@ -21,7 +21,7 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 4.16.0 + 4.16.1 CFBundleVersion 1 KeychainGroup diff --git a/package.json b/package.json index 05afdafac..d9d0dc051 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rocket-chat-reactnative", - "version": "4.16.0", + "version": "4.16.1", "private": true, "scripts": { "start": "react-native start",