NTP-7916 | React Native Version Bump (#1011)
Co-authored-by: varnit goyal <github.cicd@navi.com> Co-authored-by: Varnit Goyal <varnit.goyal@navi.com>
This commit is contained in:
16
.github/workflows/newBuild.yml
vendored
16
.github/workflows/newBuild.yml
vendored
@@ -43,7 +43,7 @@ on:
|
|||||||
default: "3.2.1"
|
default: "3.2.1"
|
||||||
jobs:
|
jobs:
|
||||||
generate:
|
generate:
|
||||||
runs-on: [ default ]
|
runs-on: [macos]
|
||||||
outputs:
|
outputs:
|
||||||
package_version: ${{ github.event.inputs.version_name }}
|
package_version: ${{ github.event.inputs.version_name }}
|
||||||
build_number: ${{ github.event.inputs.version_code }}
|
build_number: ${{ github.event.inputs.version_code }}
|
||||||
@@ -55,10 +55,10 @@ jobs:
|
|||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: update codepush key QA
|
- name: update codepush key QA
|
||||||
if: (github.event.inputs.environment == 'QA' || inputs.environment == 'QA')
|
if: (github.event.inputs.environment == 'QA' || inputs.environment == 'QA')
|
||||||
run: sed -i "s/pastekeyhere/${{ secrets.CODEPUSH_QA_KEY }}/" android/app/src/main/res/values/strings.xml && cat android/app/src/main/res/values/strings.xml
|
run: sed -i "" "s/pastekeyhere/${{ secrets.CODEPUSH_QA_KEY }}/" android/app/src/main/res/values/strings.xml && cat android/app/src/main/res/values/strings.xml
|
||||||
- name: update codepush key PROD
|
- name: update codepush key PROD
|
||||||
if: (github.event.inputs.environment == 'Prod' || inputs.environment == 'Prod')
|
if: (github.event.inputs.environment == 'Prod' || inputs.environment == 'Prod')
|
||||||
run: sed -i "s/pastekeyhere/${{ secrets.CODEPUSH_PROD_KEY }}/" android/app/src/main/res/values/strings.xml && cat android/app/src/main/res/values/strings.xml
|
run: sed -i "" "s/pastekeyhere/${{ secrets.CODEPUSH_PROD_KEY }}/" android/app/src/main/res/values/strings.xml && cat android/app/src/main/res/values/strings.xml
|
||||||
- name: Generate keystore
|
- name: Generate keystore
|
||||||
if: (github.event.inputs.type == 'release' || inputs.type == 'release')
|
if: (github.event.inputs.type == 'release' || inputs.type == 'release')
|
||||||
run: echo "${{ secrets.KEY_STORE }}" > keystore.asc && gpg -d --passphrase "${{ secrets.PASSPHARASE }}" --batch keystore.asc > android/app/my-upload-key.keystore
|
run: echo "${{ secrets.KEY_STORE }}" > keystore.asc && gpg -d --passphrase "${{ secrets.PASSPHARASE }}" --batch keystore.asc > android/app/my-upload-key.keystore
|
||||||
@@ -72,10 +72,10 @@ jobs:
|
|||||||
run: yarn
|
run: yarn
|
||||||
- name: Override App Version Code
|
- name: Override App Version Code
|
||||||
if: github.event_name == 'workflow_dispatch' && github.event.inputs.version_code != ''
|
if: github.event_name == 'workflow_dispatch' && github.event.inputs.version_code != ''
|
||||||
run: sed -i 's/def VERSION_CODE = [0-9].*/def VERSION_CODE = ${{ github.event.inputs.version_code }}/g' android/app/build.gradle
|
run: sed -i "" 's/def VERSION_CODE = [0-9].*/def VERSION_CODE = ${{ github.event.inputs.version_code }}/g' android/app/build.gradle
|
||||||
- name: Override App Version Name
|
- name: Override App Version Name
|
||||||
if: github.event_name == 'workflow_dispatch' && github.event.inputs.version_name != ''
|
if: github.event_name == 'workflow_dispatch' && github.event.inputs.version_name != ''
|
||||||
run: sed -i 's/def VERSION_NAME = "[0-9].*"/def VERSION_NAME = "${{ github.event.inputs.version_name }}"/g' android/app/build.gradle
|
run: sed -i "" 's/def VERSION_NAME = "[0-9].*"/def VERSION_NAME = "${{ github.event.inputs.version_name }}"/g' android/app/build.gradle
|
||||||
- name: Log Build Metadata
|
- name: Log Build Metadata
|
||||||
run: |
|
run: |
|
||||||
echo "Commit SHA: ${{ github.sha }}"
|
echo "Commit SHA: ${{ github.sha }}"
|
||||||
@@ -168,7 +168,7 @@ jobs:
|
|||||||
|
|
||||||
generate_source_map:
|
generate_source_map:
|
||||||
needs: generate
|
needs: generate
|
||||||
runs-on: [default]
|
runs-on: [macos]
|
||||||
outputs:
|
outputs:
|
||||||
package_version: ${{ needs.generate.outputs.package_version }}
|
package_version: ${{ needs.generate.outputs.package_version }}
|
||||||
build_number: ${{ needs.generate.outputs.build_number }}
|
build_number: ${{ needs.generate.outputs.build_number }}
|
||||||
@@ -233,7 +233,7 @@ jobs:
|
|||||||
|
|
||||||
upload_sourcemap_cybertron:
|
upload_sourcemap_cybertron:
|
||||||
needs: generate_source_map
|
needs: generate_source_map
|
||||||
runs-on: [default]
|
runs-on: [macos]
|
||||||
if: success() && (github.event.inputs.environment == 'Prod')
|
if: success() && (github.event.inputs.environment == 'Prod')
|
||||||
steps:
|
steps:
|
||||||
- name: Download Source Map
|
- name: Download Source Map
|
||||||
@@ -267,7 +267,7 @@ jobs:
|
|||||||
|
|
||||||
create_release_tag:
|
create_release_tag:
|
||||||
needs: generate_source_map
|
needs: generate_source_map
|
||||||
runs-on: [default]
|
runs-on: [macos]
|
||||||
if: success() && (github.event.inputs.environment == 'Prod') && (github.event.inputs.releaseType == 'HARD_RELEASE' || inputs.releaseType == 'HARD_RELEASE') # Only create source map for Prod releases and not for test builds
|
if: success() && (github.event.inputs.environment == 'Prod') && (github.event.inputs.releaseType == 'HARD_RELEASE' || inputs.releaseType == 'HARD_RELEASE') # Only create source map for Prod releases and not for test builds
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
apply plugin: "com.android.application"
|
apply plugin: "com.android.application"
|
||||||
apply plugin: "com.google.gms.google-services"
|
apply plugin: "com.facebook.react"
|
||||||
apply plugin: "com.google.firebase.crashlytics"
|
|
||||||
apply plugin: 'com.google.firebase.firebase-perf'
|
|
||||||
|
|
||||||
import com.android.build.OutputFile
|
|
||||||
import org.apache.tools.ant.taskdefs.condition.Os
|
import org.apache.tools.ant.taskdefs.condition.Os
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -86,19 +83,8 @@ project.ext.react = [
|
|||||||
enableNewArchitecture: true
|
enableNewArchitecture: true
|
||||||
]
|
]
|
||||||
|
|
||||||
apply from: "../../node_modules/react-native/react.gradle"
|
|
||||||
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
|
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
|
||||||
|
|
||||||
/**
|
|
||||||
* Set this to true to create two separate APKs instead of one:
|
|
||||||
* - An APK that only works on ARM devices
|
|
||||||
* - An APK that only works on x86 devices
|
|
||||||
* The advantage is the size of the APK is reduced by about 4MB.
|
|
||||||
* Upload all the APKs to the Play Store and people will download
|
|
||||||
* the correct one based on the CPU architecture of their device.
|
|
||||||
*/
|
|
||||||
def enableSeparateBuildPerCPUArchitecture = false
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run Proguard to shrink the Java bytecode in release builds.
|
* Run Proguard to shrink the Java bytecode in release builds.
|
||||||
*/
|
*/
|
||||||
@@ -126,18 +112,12 @@ def jscFlavor = 'org.webkit:android-jsc:+'
|
|||||||
*/
|
*/
|
||||||
def enableHermes = project.ext.react.get("enableHermes", false);
|
def enableHermes = project.ext.react.get("enableHermes", false);
|
||||||
|
|
||||||
/**
|
|
||||||
* Architectures to build native code for.
|
|
||||||
*/
|
|
||||||
def reactNativeArchitectures() {
|
|
||||||
def value = project.getProperties().get("reactNativeArchitectures")
|
|
||||||
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
|
|
||||||
}
|
|
||||||
|
|
||||||
def VERSION_CODE = 215
|
def VERSION_CODE = 216
|
||||||
def VERSION_NAME = "2.15.1"
|
def VERSION_NAME = "2.15.2"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
namespace "com.avapp"
|
||||||
ndkVersion rootProject.ext.ndkVersion
|
ndkVersion rootProject.ext.ndkVersion
|
||||||
|
|
||||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||||
@@ -148,80 +128,12 @@ android {
|
|||||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||||
versionCode VERSION_CODE
|
versionCode VERSION_CODE
|
||||||
versionName VERSION_NAME
|
versionName VERSION_NAME
|
||||||
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
|
||||||
buildConfigField "string", "FLAVOR", '"'
|
buildConfigField "string", "FLAVOR", '"'
|
||||||
buildConfigField "string", "BUILD_FLAVOR", '"'
|
buildConfigField "string", "BUILD_FLAVOR", '"'
|
||||||
buildConfigField "string", "APP_NAME", '"'
|
buildConfigField "string", "APP_NAME", '"'
|
||||||
buildConfigField "string", "API_KEY", '"'
|
buildConfigField "string", "API_KEY", '"'
|
||||||
|
|
||||||
if (isNewArchitectureEnabled()) {
|
|
||||||
// We configure the CMake build only if you decide to opt-in for the New Architecture.
|
|
||||||
externalNativeBuild {
|
|
||||||
cmake {
|
|
||||||
arguments "-DPROJECT_BUILD_DIR=$buildDir",
|
|
||||||
"-DREACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid",
|
|
||||||
"-DREACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build",
|
|
||||||
"-DNODE_MODULES_DIR=$rootDir/../node_modules",
|
|
||||||
"-DANDROID_STL=c++_shared"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!enableSeparateBuildPerCPUArchitecture) {
|
|
||||||
ndk {
|
|
||||||
abiFilters (*reactNativeArchitectures())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isNewArchitectureEnabled()) {
|
|
||||||
// We configure the NDK build only if you decide to opt-in for the New Architecture.
|
|
||||||
externalNativeBuild {
|
|
||||||
cmake {
|
|
||||||
path "$projectDir/src/main/jni/CMakeLists.txt"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
def reactAndroidProjectDir = project(':ReactAndroid').projectDir
|
|
||||||
def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) {
|
|
||||||
dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck")
|
|
||||||
from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
|
|
||||||
into("$buildDir/react-ndk/exported")
|
|
||||||
}
|
|
||||||
def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) {
|
|
||||||
dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck")
|
|
||||||
from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
|
|
||||||
into("$buildDir/react-ndk/exported")
|
|
||||||
}
|
|
||||||
afterEvaluate {
|
|
||||||
// If you wish to add a custom TurboModule or component locally,
|
|
||||||
// you should uncomment this line.
|
|
||||||
// preBuild.dependsOn("generateCodegenArtifactsFromSchema")
|
|
||||||
preDebugBuild.dependsOn(packageReactNdkDebugLibs)
|
|
||||||
preReleaseBuild.dependsOn(packageReactNdkReleaseLibs)
|
|
||||||
|
|
||||||
// Due to a bug inside AGP, we have to explicitly set a dependency
|
|
||||||
// between configureCMakeDebug* tasks and the preBuild tasks.
|
|
||||||
// This can be removed once this is solved: https://issuetracker.google.com/issues/207403732
|
|
||||||
configureCMakeRelWithDebInfo.dependsOn(preReleaseBuild)
|
|
||||||
configureCMakeDebug.dependsOn(preDebugBuild)
|
|
||||||
reactNativeArchitectures().each { architecture ->
|
|
||||||
tasks.findByName("configureCMakeDebug[${architecture}]")?.configure {
|
|
||||||
dependsOn("preDebugBuild")
|
|
||||||
}
|
|
||||||
tasks.findByName("configureCMakeRelWithDebInfo[${architecture}]")?.configure {
|
|
||||||
dependsOn("preReleaseBuild")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
splits {
|
|
||||||
abi {
|
|
||||||
reset()
|
|
||||||
enable enableSeparateBuildPerCPUArchitecture
|
|
||||||
universalApk false // If true, also generate a universal APK
|
|
||||||
include (*reactNativeArchitectures())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
debug {
|
debug {
|
||||||
if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
|
if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
|
||||||
@@ -259,21 +171,6 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// applicationVariants are e.g. debug, release
|
|
||||||
applicationVariants.all { variant ->
|
|
||||||
variant.outputs.each { output ->
|
|
||||||
// For each separate APK per architecture, set a unique version code as described here:
|
|
||||||
// https://developer.android.com/studio/build/configure-apk-splits.html
|
|
||||||
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
|
|
||||||
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
|
|
||||||
def abi = output.getFilter(OutputFile.ABI)
|
|
||||||
if (abi != null) { // null for the universal-debug, universal-release variants
|
|
||||||
output.versionCodeOverride =
|
|
||||||
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
flavorDimensions "env"
|
flavorDimensions "env"
|
||||||
productFlavors {
|
productFlavors {
|
||||||
fieldAgentsQA {
|
fieldAgentsQA {
|
||||||
@@ -328,48 +225,22 @@ dependencies {
|
|||||||
implementation 'androidx.work:work-runtime-ktx:2.8.1'
|
implementation 'androidx.work:work-runtime-ktx:2.8.1'
|
||||||
|
|
||||||
//noinspection GradleDynamicVersion
|
//noinspection GradleDynamicVersion
|
||||||
implementation "com.facebook.react:react-native:+" // From node_modules
|
implementation("com.facebook.react:react-android")
|
||||||
|
|
||||||
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
|
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
|
||||||
|
|
||||||
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
|
|
||||||
exclude group:'com.facebook.fbjni'
|
|
||||||
}
|
|
||||||
|
|
||||||
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
|
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
|
||||||
exclude group:'com.facebook.flipper'
|
|
||||||
exclude group:'com.squareup.okhttp3', module:'okhttp'
|
exclude group:'com.squareup.okhttp3', module:'okhttp'
|
||||||
}
|
}
|
||||||
|
|
||||||
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
|
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
|
||||||
exclude group:'com.facebook.flipper'
|
|
||||||
}
|
|
||||||
if (enableHermes) {
|
if (enableHermes) {
|
||||||
//noinspection GradleDynamicVersion
|
//noinspection GradleDynamicVersion
|
||||||
implementation("com.facebook.react:hermes-engine:+") { // From node_modules
|
implementation("com.facebook.react:hermes-android")
|
||||||
exclude group:'com.facebook.fbjni'
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
implementation jscFlavor
|
implementation jscFlavor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isNewArchitectureEnabled()) {
|
|
||||||
// If new architecture is enabled, we let you build RN from source
|
|
||||||
// Otherwise we fallback to a prebuilt .aar bundled in the NPM package.
|
|
||||||
// This will be applied to all the imported transtitive dependency.
|
|
||||||
configurations.all {
|
|
||||||
resolutionStrategy.dependencySubstitution {
|
|
||||||
substitute(module("com.facebook.react:react-native"))
|
|
||||||
.using(project(":ReactAndroid"))
|
|
||||||
.because("On New Architecture we're building React Native from source")
|
|
||||||
substitute(module("com.facebook.react:hermes-engine"))
|
|
||||||
.using(project(":ReactAndroid:hermes-engine"))
|
|
||||||
.because("On New Architecture we're building Hermes from source")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Run this once to be able to run the application with BUCK
|
// Run this once to be able to run the application with BUCK
|
||||||
// puts all compile dependencies into folder libs for BUCK to use
|
// puts all compile dependencies into folder libs for BUCK to use
|
||||||
task copyDownloadableDepsToLibs(type: Copy) {
|
task copyDownloadableDepsToLibs(type: Copy) {
|
||||||
@@ -379,13 +250,8 @@ task copyDownloadableDepsToLibs(type: Copy) {
|
|||||||
|
|
||||||
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
|
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
|
||||||
|
|
||||||
def isNewArchitectureEnabled() {
|
|
||||||
// To opt-in for the New Architecture, you can either:
|
|
||||||
// - Set `newArchEnabled` to true inside the `gradle.properties` file
|
|
||||||
// - Invoke gradle with `-newArchEnabled=true`
|
|
||||||
// - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
|
|
||||||
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
|
|
||||||
}
|
|
||||||
apply plugin: 'com.google.gms.google-services'
|
apply plugin: 'com.google.gms.google-services'
|
||||||
|
apply plugin: "com.google.firebase.crashlytics"
|
||||||
|
apply plugin: 'com.google.firebase.firebase-perf'
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
|
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
|
||||||
<uses-permission android:name="android.permission.RECEIVE_WAP_PUSH" />
|
<uses-permission android:name="android.permission.RECEIVE_WAP_PUSH" />
|
||||||
<uses-permission android:name="android.permission.POST_NOTIFICATION" />
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||||
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
|
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
|
||||||
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
|
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
||||||
|
|||||||
@@ -62,12 +62,12 @@ public class MainActivity extends ReactActivity implements AlfredFirebaseHelper
|
|||||||
return reactRootView;
|
return reactRootView;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
// @Override
|
||||||
protected boolean isConcurrentRootEnabled() {
|
// protected boolean isConcurrentRootEnabled() {
|
||||||
// If you opted-in for the New Architecture, we enable Concurrent Root (i.e. React 18).
|
// // If you opted-in for the New Architecture, we enable Concurrent Root (i.e. React 18).
|
||||||
// More on this on https://reactjs.org/blog/2022/03/29/react-v18.html
|
// // More on this on https://reactjs.org/blog/2022/03/29/react-v18.html
|
||||||
return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
|
// return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ buildscript {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath("com.android.tools.build:gradle:7.2.1")
|
classpath("com.android.tools.build:gradle")
|
||||||
classpath("com.facebook.react:react-native-gradle-plugin")
|
classpath("com.facebook.react:react-native-gradle-plugin")
|
||||||
classpath("de.undercouch:gradle-download-task:5.0.1")
|
classpath("de.undercouch:gradle-download-task:5.0.1")
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ android.useAndroidX=true
|
|||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
|
|
||||||
# Version of flipper SDK to use with React Native
|
# Version of flipper SDK to use with React Native
|
||||||
FLIPPER_VERSION=0.125.0
|
FLIPPER_VERSION=0.182.0
|
||||||
VERSION_NAME=1.2.3
|
VERSION_NAME=1.2.3
|
||||||
|
|
||||||
# Use this property to specify which architecture you want to build.
|
# Use this property to specify which architecture you want to build.
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip
|
||||||
|
networkTimeout=10000
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
9
android/gradlew
vendored
9
android/gradlew
vendored
@@ -55,7 +55,7 @@
|
|||||||
# Darwin, MinGW, and NonStop.
|
# Darwin, MinGW, and NonStop.
|
||||||
#
|
#
|
||||||
# (3) This script is generated from the Groovy template
|
# (3) This script is generated from the Groovy template
|
||||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
# within the Gradle project.
|
# within the Gradle project.
|
||||||
#
|
#
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
@@ -84,6 +84,7 @@ APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
|||||||
|
|
||||||
APP_NAME="Gradle"
|
APP_NAME="Gradle"
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
|
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
@@ -205,6 +206,12 @@ set -- \
|
|||||||
org.gradle.wrapper.GradleWrapperMain \
|
org.gradle.wrapper.GradleWrapperMain \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
|
# Stop when "xargs" is not available.
|
||||||
|
if ! command -v xargs >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "xargs is not available"
|
||||||
|
fi
|
||||||
|
|
||||||
# Use "xargs" to parse quoted args.
|
# Use "xargs" to parse quoted args.
|
||||||
#
|
#
|
||||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ rootProject.name = 'AVAPP'
|
|||||||
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
|
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
|
||||||
include ':app', ':react-native-code-push'
|
include ':app', ':react-native-code-push'
|
||||||
include ':react-native-version-number'
|
include ':react-native-version-number'
|
||||||
includeBuild('../node_modules/react-native-gradle-plugin')
|
includeBuild('../node_modules/@react-native/gradle-plugin')
|
||||||
|
|
||||||
if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") {
|
if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") {
|
||||||
include(":ReactAndroid")
|
include(":ReactAndroid")
|
||||||
@@ -10,6 +10,16 @@ if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true")
|
|||||||
include(":ReactAndroid:hermes-engine")
|
include(":ReactAndroid:hermes-engine")
|
||||||
project(":ReactAndroid:hermes-engine").projectDir = file('../node_modules/react-native/ReactAndroid/hermes-engine')
|
project(":ReactAndroid:hermes-engine").projectDir = file('../node_modules/react-native/ReactAndroid/hermes-engine')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
includeBuild('../node_modules/react-native') {
|
||||||
|
dependencySubstitution {
|
||||||
|
substitute(module("com.facebook.react:react-android")).using(project(":packages:react-native:ReactAndroid"))
|
||||||
|
substitute(module("com.facebook.react:react-native")).using(project(":packages:react-native:ReactAndroid"))
|
||||||
|
// substitute(module("com.facebook.react:hermes-android")).using(project(":packages:react-native:ReactAndroid:hermes-engine"))
|
||||||
|
// substitute(module("com.facebook.react:hermes-engine")).using(project(":packages:react-native:ReactAndroid:hermes-engine"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app')
|
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app')
|
||||||
|
|
||||||
project(':react-native-version-number').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-version-number/android')
|
project(':react-native-version-number').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-version-number/android')
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
|
||||||
const { withSentryConfig } = require('@sentry/react-native/metro');
|
const { withSentryConfig } = require('@sentry/react-native/metro');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -7,7 +8,7 @@ const { withSentryConfig } = require('@sentry/react-native/metro');
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = withSentryConfig({
|
const config = withSentryConfig({
|
||||||
transformer: {
|
transformer: {
|
||||||
getTransformOptions: async () => ({
|
getTransformOptions: async () => ({
|
||||||
transform: {
|
transform: {
|
||||||
@@ -17,3 +18,5 @@ module.exports = withSentryConfig({
|
|||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
module.exports = mergeConfig(getDefaultConfig(__dirname), config);
|
||||||
|
|||||||
71
package.json
71
package.json
@@ -1,24 +1,24 @@
|
|||||||
{
|
{
|
||||||
"name": "AV_APP",
|
"name": "AV_APP",
|
||||||
"version": "2.15.1",
|
"version": "2.15.2",
|
||||||
"buildNumber": "215",
|
"buildNumber": "216",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"android:dev": "yarn move:dev && react-native run-android",
|
"android:dev": "yarn move:dev && react-native run-android",
|
||||||
"android:qa": "yarn move:qa && react-native run-android",
|
"android:qa": "yarn move:qa && react-native run-android",
|
||||||
"android:prod": "yarn move:prod && react-native run-android",
|
"android:prod": "yarn move:prod && react-native run-android",
|
||||||
"android-field:dev": "yarn move:dev && react-native run-android --variant=fieldAgentsQADebug",
|
"android-field:dev": "yarn move:dev && react-native run-android --mode=fieldAgentsQADebug",
|
||||||
"android-field:qa": "yarn move:qa && react-native run-android --variant=fieldAgentsQADebug",
|
"android-field:qa": "yarn move:qa && react-native run-android --mode=fieldAgentsQADebug",
|
||||||
"android-field:prod": "yarn move:prod && react-native run-android --variant=fieldAgentsProdDebug",
|
"android-field:prod": "yarn move:prod && react-native run-android --mode=fieldAgentsProdDebug",
|
||||||
"release-field:dev": "yarn move:dev && react-native run-android --variant=fieldAgentsQARelease && cd android && ./gradlew assemblefieldAgentsQARelease",
|
"release-field:dev": "yarn move:dev && react-native run-android --mode=fieldAgentsQARelease && cd android && ./gradlew assemblefieldAgentsQARelease",
|
||||||
"release-field:qa": "yarn move:qa && react-native run-android --variant=fieldAgentsQARelease && cd android && ./gradlew assemblefieldAgentsQARelease",
|
"release-field:qa": "yarn move:qa && react-native run-android --mode=fieldAgentsQARelease && cd android && ./gradlew assemblefieldAgentsQARelease",
|
||||||
"release-field:prod": "yarn move:prod && react-native run-android --variant=fieldAgentsProdRelease && cd android && ./gradlew assemblefieldAgentsProdRelease",
|
"release-field:prod": "yarn move:prod && react-native run-android --mode=fieldAgentsProdRelease && cd android && ./gradlew assemblefieldAgentsProdRelease",
|
||||||
"android-calling:dev": "yarn move:dev && react-native run-android --variant=callingAgentsQADebug",
|
"android-calling:dev": "yarn move:dev && react-native run-android --mode=callingAgentsQADebug",
|
||||||
"android-calling:qa": "yarn move:qa && react-native run-android --variant=callingAgentsQADebug",
|
"android-calling:qa": "yarn move:qa && react-native run-android --mode=callingAgentsQADebug",
|
||||||
"android-calling:prod": "yarn move:prod && react-native run-android --variant=callingAgentsProdDebug",
|
"android-calling:prod": "yarn move:prod && react-native run-android --mode=callingAgentsProdDebug",
|
||||||
"release-calling:dev": "yarn move:dev && react-native run-android --variant=callingAgentsQARelease && cd android && ./gradlew assemblecallingAgentsQARelease",
|
"release-calling:dev": "yarn move:dev && react-native run-android --mode=callingAgentsQARelease && cd android && ./gradlew assemblecallingAgentsQARelease",
|
||||||
"release-calling:qa": "yarn move:qa && react-native run-android --variant=callingAgentsQARelease && cd android && ./gradlew assemblecallingAgentsQARelease",
|
"release-calling:qa": "yarn move:qa && react-native run-android --mode=callingAgentsQARelease && cd android && ./gradlew assemblecallingAgentsQARelease",
|
||||||
"release-calling:prod": "yarn move:dev && react-native run-android --variant=callingAgentsProdRelease && cd android && ./gradlew assemblecallingAgentsProdRelease",
|
"release-calling:prod": "yarn move:dev && react-native run-android --mode=callingAgentsProdRelease && cd android && ./gradlew assemblecallingAgentsProdRelease",
|
||||||
"ios": "react-native run-ios",
|
"ios": "react-native run-ios",
|
||||||
"start": "react-native start",
|
"start": "react-native start",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
@@ -39,22 +39,23 @@
|
|||||||
"@bam.tech/react-native-image-resizer": "3.0.5",
|
"@bam.tech/react-native-image-resizer": "3.0.5",
|
||||||
"@notifee/react-native": "7.8.2",
|
"@notifee/react-native": "7.8.2",
|
||||||
"@nozbe/with-observables": "1.4.1",
|
"@nozbe/with-observables": "1.4.1",
|
||||||
|
"@react-native/metro-config": "0.72.11",
|
||||||
"@react-native-async-storage/async-storage": "1.17.11",
|
"@react-native-async-storage/async-storage": "1.17.11",
|
||||||
"@react-native-clipboard/clipboard": "^1.11.2",
|
"@react-native-clipboard/clipboard": "^1.11.2",
|
||||||
"@react-native-community/netinfo": "9.3.7",
|
"@react-native-community/netinfo": "9.3.7",
|
||||||
"@react-native-firebase/analytics": "16.4.6",
|
"@react-native-firebase/analytics": "16.7.0",
|
||||||
"@react-native-firebase/app": "16.4.6",
|
"@react-native-firebase/app": "16.7.0",
|
||||||
"@react-native-firebase/auth": "16.5.0",
|
"@react-native-firebase/auth": "16.7.0",
|
||||||
"@react-native-firebase/crashlytics": "16.5.0",
|
"@react-native-firebase/crashlytics": "16.7.0",
|
||||||
"@react-native-firebase/database": "16.4.6",
|
"@react-native-firebase/database": "16.7.0",
|
||||||
"@react-native-firebase/firestore": "16.5.0",
|
"@react-native-firebase/firestore": "16.7.0",
|
||||||
"@react-native-firebase/messaging": "17.4.0",
|
"@react-native-firebase/messaging": "16.7.0",
|
||||||
"@react-native-firebase/perf": "16.5.2",
|
"@react-native-firebase/perf": "16.7.0",
|
||||||
"@react-native-firebase/remote-config": "16.4.6",
|
"@react-native-firebase/remote-config": "16.7.0",
|
||||||
"@react-native-google-signin/google-signin": "9.0.2",
|
"@react-native-google-signin/google-signin": "13.1.0",
|
||||||
"@react-navigation/bottom-tabs": "6.5.5",
|
"@react-navigation/bottom-tabs": "6.6.1",
|
||||||
"@react-navigation/native": "6.1.4",
|
"@react-navigation/native": "6.1.18",
|
||||||
"@react-navigation/native-stack": "6.9.4",
|
"@react-navigation/native-stack": "6.11.0",
|
||||||
"@reduxjs/toolkit": "1.9.1",
|
"@reduxjs/toolkit": "1.9.1",
|
||||||
"@sentry/react-native": "5.35.0",
|
"@sentry/react-native": "5.35.0",
|
||||||
"@shopify/flash-list": "1.4.3",
|
"@shopify/flash-list": "1.4.3",
|
||||||
@@ -68,15 +69,15 @@
|
|||||||
"dayjs": "1.11.9",
|
"dayjs": "1.11.9",
|
||||||
"fuzzysort": "2.0.4",
|
"fuzzysort": "2.0.4",
|
||||||
"lodash.chunk": "^4.2.0",
|
"lodash.chunk": "^4.2.0",
|
||||||
"lottie-react-native": "5.1.4",
|
"lottie-react-native": "6.4.0",
|
||||||
"patch-package": "8.0.0",
|
"patch-package": "8.0.0",
|
||||||
"postinstall-postinstall": "2.1.0",
|
"postinstall-postinstall": "2.1.0",
|
||||||
"react": "18.1.0",
|
"react": "18.2.0",
|
||||||
"react-hook-form": "7.40.0",
|
"react-hook-form": "7.40.0",
|
||||||
"react-native": "0.70.6",
|
"react-native": "0.72.6",
|
||||||
"react-native-blob-util": "0.17.3",
|
"react-native-blob-util": "0.17.3",
|
||||||
"react-native-call-log": "2.1.2",
|
"react-native-call-log": "2.1.2",
|
||||||
"react-native-code-push": "7.1.0",
|
"react-native-code-push": "8.3.1",
|
||||||
"react-native-contacts": "7.0.5",
|
"react-native-contacts": "7.0.5",
|
||||||
"react-native-device-info": "10.3.0",
|
"react-native-device-info": "10.3.0",
|
||||||
"react-native-fast-image": "8.6.3",
|
"react-native-fast-image": "8.6.3",
|
||||||
@@ -85,7 +86,7 @@
|
|||||||
"react-native-get-sms-android": "2.1.0",
|
"react-native-get-sms-android": "2.1.0",
|
||||||
"react-native-gzip": "1.0.0",
|
"react-native-gzip": "1.0.0",
|
||||||
"react-native-image-picker": "4.10.2",
|
"react-native-image-picker": "4.10.2",
|
||||||
"react-native-mmkv": "2.5.1",
|
"react-native-mmkv": "2.11.0",
|
||||||
"react-native-pager-view": "6.1.2",
|
"react-native-pager-view": "6.1.2",
|
||||||
"react-native-pdf-renderer": "1.1.1",
|
"react-native-pdf-renderer": "1.1.1",
|
||||||
"react-native-permissions": "3.6.1",
|
"react-native-permissions": "3.6.1",
|
||||||
@@ -102,7 +103,7 @@
|
|||||||
"redux-persist": "6.0.0"
|
"redux-persist": "6.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "7.12.9",
|
"@babel/core": "7.25.2",
|
||||||
"@babel/plugin-proposal-decorators": "7.20.7",
|
"@babel/plugin-proposal-decorators": "7.20.7",
|
||||||
"@babel/runtime": "7.12.5",
|
"@babel/runtime": "7.12.5",
|
||||||
"@tsconfig/react-native": "2.0.2",
|
"@tsconfig/react-native": "2.0.2",
|
||||||
@@ -110,7 +111,7 @@
|
|||||||
"@types/d3-shape": "^3.1.3",
|
"@types/d3-shape": "^3.1.3",
|
||||||
"@types/jest": "26.0.23",
|
"@types/jest": "26.0.23",
|
||||||
"@types/react": "18.0.21",
|
"@types/react": "18.0.21",
|
||||||
"@types/react-native": "0.70.6",
|
"@types/react-native": "0.71.13",
|
||||||
"@types/react-native-fetch-blob": "0.10.7",
|
"@types/react-native-fetch-blob": "0.10.7",
|
||||||
"@types/react-native-video": "5.0.14",
|
"@types/react-native-video": "5.0.14",
|
||||||
"@types/react-native-video-player": "0.10.3",
|
"@types/react-native-video-player": "0.10.3",
|
||||||
@@ -138,7 +139,7 @@
|
|||||||
"husky": "8.0.0",
|
"husky": "8.0.0",
|
||||||
"jest": "26.6.3",
|
"jest": "26.6.3",
|
||||||
"lint-staged": "13.2.1",
|
"lint-staged": "13.2.1",
|
||||||
"metro-react-native-babel-preset": "0.72.3",
|
"metro-react-native-babel-preset": "0.76.8",
|
||||||
"miragejs": "0.1.47",
|
"miragejs": "0.1.47",
|
||||||
"prettier": "^2.8.7",
|
"prettier": "^2.8.7",
|
||||||
"react-test-renderer": "18.1.0",
|
"react-test-renderer": "18.1.0",
|
||||||
|
|||||||
8
react-native.config.js
Normal file
8
react-native.config.js
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
module.exports = {
|
||||||
|
project: {
|
||||||
|
ios: {},
|
||||||
|
android: {
|
||||||
|
unstable_reactLegacyComponentNames: ['FastImageView', 'FlashList'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
@@ -1444,7 +1444,7 @@ export const PermissionsToCheck: Permission[] = [
|
|||||||
PermissionsAndroid.PERMISSIONS.READ_PHONE_STATE,
|
PermissionsAndroid.PERMISSIONS.READ_PHONE_STATE,
|
||||||
PermissionsAndroid.PERMISSIONS.SEND_SMS,
|
PermissionsAndroid.PERMISSIONS.SEND_SMS,
|
||||||
PermissionsAndroid.PERMISSIONS.RECEIVE_WAP_PUSH,
|
PermissionsAndroid.PERMISSIONS.RECEIVE_WAP_PUSH,
|
||||||
PermissionsAndroid.PERMISSIONS.POST_NOTIFICATION,
|
PermissionsAndroid.PERMISSIONS.POST_NOTIFICATIONS,
|
||||||
];
|
];
|
||||||
|
|
||||||
export const BLOCKER_SCREEN_DATA = {
|
export const BLOCKER_SCREEN_DATA = {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export const getPermissionsToRequest = async () => {
|
|||||||
const permissionsToValidate = getPermissionsToValidate();
|
const permissionsToValidate = getPermissionsToValidate();
|
||||||
for (let i = 0; i < permissionsToValidate.length; i++) {
|
for (let i = 0; i < permissionsToValidate.length; i++) {
|
||||||
const permission = permissionsToValidate[i];
|
const permission = permissionsToValidate[i];
|
||||||
if (permission === PermissionsAndroid.PERMISSIONS.POST_NOTIFICATION) {
|
if (permission === PermissionsAndroid.PERMISSIONS.POST_NOTIFICATIONS) {
|
||||||
const notificationPermission = await checkNotifications();
|
const notificationPermission = await checkNotifications();
|
||||||
const notificationStatus = notificationPermission.status === 'granted';
|
const notificationStatus = notificationPermission.status === 'granted';
|
||||||
isNotificationPermissionEnabled = notificationStatus;
|
isNotificationPermissionEnabled = notificationStatus;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import {
|
|||||||
Pressable,
|
Pressable,
|
||||||
LayoutAnimation,
|
LayoutAnimation,
|
||||||
UIManager,
|
UIManager,
|
||||||
|
Platform,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import Text from '../../../RN-UI-LIB/src/components/Text';
|
import Text from '../../../RN-UI-LIB/src/components/Text';
|
||||||
import { COLORS } from '../../../RN-UI-LIB/src/styles/colors';
|
import { COLORS } from '../../../RN-UI-LIB/src/styles/colors';
|
||||||
@@ -18,11 +19,10 @@ import { getPerformanceLevel } from './utils';
|
|||||||
import { addClickstreamEvent } from '@services/clickstreamEventService';
|
import { addClickstreamEvent } from '@services/clickstreamEventService';
|
||||||
import { CLICKSTREAM_EVENT_NAMES } from '@common/Constants';
|
import { CLICKSTREAM_EVENT_NAMES } from '@common/Constants';
|
||||||
|
|
||||||
if (
|
if (Platform.OS === 'android') {
|
||||||
Platform.OS === 'android' &&
|
if (UIManager.setLayoutAnimationEnabledExperimental) {
|
||||||
UIManager.setLayoutAnimationEnabledExperimental
|
UIManager.setLayoutAnimationEnabledExperimental(true);
|
||||||
) {
|
}
|
||||||
UIManager.setLayoutAnimationEnabledExperimental(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const PerformanceMeter = () => {
|
const PerformanceMeter = () => {
|
||||||
|
|||||||
@@ -150,4 +150,4 @@ const styles = StyleSheet.create({
|
|||||||
color: COLORS.TEXT.DARK,
|
color: COLORS.TEXT.DARK,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
export default CaseItem;
|
export default React.memo(CaseItem);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||||
import { Modal, RefreshControl, ScrollView, StyleSheet, View } from 'react-native';
|
import { Modal, RefreshControl, ScrollView, StyleSheet, View } from 'react-native';
|
||||||
import Accordion from '../../../../RN-UI-LIB/src/components/accordian/Accordian';
|
import Accordion from '../../../../RN-UI-LIB/src/components/accordian/Accordian';
|
||||||
import NavigationHeader from '../../../../RN-UI-LIB/src/components/NavigationHeader';
|
import NavigationHeader from '../../../../RN-UI-LIB/src/components/NavigationHeader';
|
||||||
@@ -105,7 +105,7 @@ const FeedbackDetailContainer: React.FC<IFeedbackDetailContainer> = ({ route: ro
|
|||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [currentPage, setCurrentPage] = useState(pageNo);
|
const [currentPage, setCurrentPage] = useState(pageNo);
|
||||||
const [dataSourceCord, setDataSourceCord] = useState(0);
|
const [dataSourceCord, setDataSourceCord] = useState(0);
|
||||||
const [ref, setRef] = useState<GenericType>();
|
const ref = useRef();
|
||||||
const [showFilterModal, setShowFilterModal] = useState(false);
|
const [showFilterModal, setShowFilterModal] = useState(false);
|
||||||
|
|
||||||
const fetchFeedbacks = useCallback(
|
const fetchFeedbacks = useCallback(
|
||||||
@@ -188,7 +188,7 @@ const FeedbackDetailContainer: React.FC<IFeedbackDetailContainer> = ({ route: ro
|
|||||||
if (!ref || !dataSourceCord) {
|
if (!ref || !dataSourceCord) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ref.scrollTo({
|
ref?.current?.scrollTo({
|
||||||
x: 0,
|
x: 0,
|
||||||
y: dataSourceCord,
|
y: dataSourceCord,
|
||||||
animated: true,
|
animated: true,
|
||||||
@@ -270,7 +270,7 @@ const FeedbackDetailContainer: React.FC<IFeedbackDetailContainer> = ({ route: ro
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
style={[GenericStyles.ph16, GenericStyles.fill]}
|
style={[GenericStyles.ph16, GenericStyles.fill]}
|
||||||
ref={(x) => setRef(x)}
|
ref={ref}
|
||||||
>
|
>
|
||||||
<SuspenseLoader
|
<SuspenseLoader
|
||||||
loading={loading}
|
loading={loading}
|
||||||
|
|||||||
@@ -87,12 +87,13 @@ function Login() {
|
|||||||
try {
|
try {
|
||||||
await GoogleSignin.hasPlayServices();
|
await GoogleSignin.hasPlayServices();
|
||||||
const userInfo: GoogleSigninUser = await GoogleSignin.signIn();
|
const userInfo: GoogleSigninUser = await GoogleSignin.signIn();
|
||||||
if (userInfo?.serverAuthCode) {
|
const serverAuthCode = userInfo?.data?.serverAuthCode || userInfo?.serverAuthCode
|
||||||
|
if (serverAuthCode) {
|
||||||
toast({
|
toast({
|
||||||
text1: ToastMessages.FETCHING_USER_DATA,
|
text1: ToastMessages.FETCHING_USER_DATA,
|
||||||
type: 'success',
|
type: 'success',
|
||||||
});
|
});
|
||||||
await dispatch(verifyGoogleSignIn(userInfo.serverAuthCode));
|
await dispatch(verifyGoogleSignIn(serverAuthCode));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
throw userInfo;
|
throw userInfo;
|
||||||
|
|||||||
Reference in New Issue
Block a user