Skip to content

Commit

Permalink
Merge pull request #214 from internxt/releases/1.5.31
Browse files Browse the repository at this point in the history
Mobile 1.5.31 release
  • Loading branch information
PixoDev authored Oct 17, 2023
2 parents 8a36daa + e8097f4 commit 560d789
Show file tree
Hide file tree
Showing 52 changed files with 249 additions and 63 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ android {
applicationId 'com.internxt.cloud'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 77
versionName "1.5.29"
versionCode 80
versionName "1.5.31"
testBuildType System.getProperty('testBuildType', 'debug') // This will later be used to control the test apk build type
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</queries>
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:allowBackup="true" android:theme="@style/AppTheme" android:usesCleartextTraffic="true" android:requestLegacyExternalStorage="true" android:roundIcon="@mipmap/ic_launcher_round">
<meta-data android:name="expo.modules.updates.ENABLED" android:value="true"/>
<meta-data android:name="expo.modules.updates.EXPO_RUNTIME_VERSION" android:value="1.5.28"/>
<meta-data android:name="expo.modules.updates.EXPO_RUNTIME_VERSION" android:value="1.5.31"/>
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>
<meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://u.expo.dev/680f4feb-6315-4a50-93ec-36dcd0b831d2"/>
Expand Down
Binary file modified android/app/src/main/res/drawable-hdpi/splashscreen_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-mdpi/splashscreen_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-xhdpi/splashscreen_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-xxhdpi/splashscreen_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-xxxhdpi/splashscreen_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/icon-android.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/icon-ios.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 32 additions & 32 deletions ios/Internxt.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
1479274634F84D1E9DCCE0B4 /* noop-file.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFCCFD5298584EE79685BC74 /* noop-file.swift */; };
2479B7AF1A28734A4CEA6D62 /* libPods-Internxt.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 33565C8ECECFE0F9E1666E95 /* libPods-Internxt.a */; };
3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */; };
4157697FC812CEF24B67069E /* libPods-Internxt.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D752CC0B9EB407621286E67 /* libPods-Internxt.a */; };
B18059E884C0ABDD17F3DC3D /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */; };
BB2F792D24A3F905000567C9 /* Expo.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB2F792C24A3F905000567C9 /* Expo.plist */; };
/* End PBXBuildFile section */
Expand All @@ -26,9 +26,9 @@
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Internxt/Images.xcassets; sourceTree = "<group>"; };
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Internxt/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Internxt/main.m; sourceTree = "<group>"; };
262CC3B19AC923BAF2E0DEAA /* Pods-Internxt.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Internxt.release.xcconfig"; path = "Target Support Files/Pods-Internxt/Pods-Internxt.release.xcconfig"; sourceTree = "<group>"; };
33565C8ECECFE0F9E1666E95 /* libPods-Internxt.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Internxt.a"; sourceTree = BUILT_PRODUCTS_DIR; };
8824BD7A75B06A5E02BBDE4D /* Pods-Internxt.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Internxt.debug.xcconfig"; path = "Target Support Files/Pods-Internxt/Pods-Internxt.debug.xcconfig"; sourceTree = "<group>"; };
3775BDE2EF396BB5E89C6A1A /* Pods-Internxt.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Internxt.release.xcconfig"; path = "Target Support Files/Pods-Internxt/Pods-Internxt.release.xcconfig"; sourceTree = "<group>"; };
83B954F6F743DE27490FED54 /* Pods-Internxt.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Internxt.debug.xcconfig"; path = "Target Support Files/Pods-Internxt/Pods-Internxt.debug.xcconfig"; sourceTree = "<group>"; };
8D752CC0B9EB407621286E67 /* libPods-Internxt.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Internxt.a"; sourceTree = BUILT_PRODUCTS_DIR; };
AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = SplashScreen.storyboard; path = Internxt/SplashScreen.storyboard; sourceTree = "<group>"; };
BB2F792C24A3F905000567C9 /* Expo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Expo.plist; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
Expand All @@ -41,7 +41,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
2479B7AF1A28734A4CEA6D62 /* libPods-Internxt.a in Frameworks */,
4157697FC812CEF24B67069E /* libPods-Internxt.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -69,7 +69,7 @@
isa = PBXGroup;
children = (
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
33565C8ECECFE0F9E1666E95 /* libPods-Internxt.a */,
8D752CC0B9EB407621286E67 /* libPods-Internxt.a */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -124,8 +124,8 @@
D65327D7A22EEC0BE12398D9 /* Pods */ = {
isa = PBXGroup;
children = (
8824BD7A75B06A5E02BBDE4D /* Pods-Internxt.debug.xcconfig */,
262CC3B19AC923BAF2E0DEAA /* Pods-Internxt.release.xcconfig */,
83B954F6F743DE27490FED54 /* Pods-Internxt.debug.xcconfig */,
3775BDE2EF396BB5E89C6A1A /* Pods-Internxt.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
Expand All @@ -145,14 +145,14 @@
isa = PBXNativeTarget;
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Internxt" */;
buildPhases = (
4DD8F6FF8D1F02CABA96BEB9 /* [CP] Check Pods Manifest.lock */,
34F50D1BE7C2118FBD00BA82 /* [CP] Check Pods Manifest.lock */,
FD10A7F022414F080027D42C /* Start Packager */,
13B07F871A680F5B00A75B9A /* Sources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
C0ABA4564B7F48269ACCB374 /* Upload Debug Symbols to Sentry */,
0C041770D811CE89DB35697C /* [CP] Copy Pods Resources */,
99AFE0A7D54A7FE44ACF74F6 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -224,48 +224,48 @@
shellPath = /bin/sh;
shellScript = "export SENTRY_PROPERTIES=sentry.properties\nexport EXTRA_PACKAGER_ARGS=\"--sourcemap-output $DERIVED_FILE_DIR/main.jsbundle.map\"\nexport NODE_BINARY=node\n../node_modules/@sentry/cli/bin/sentry-cli react-native xcode ../node_modules/react-native/scripts/react-native-xcode.sh\n";
};
0C041770D811CE89DB35697C /* [CP] Copy Pods Resources */ = {
34F50D1BE7C2118FBD00BA82 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Internxt/Pods-Internxt-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/EXConstants.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/EXUpdates/EXUpdates.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXConstants.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXUpdates.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
"$(DERIVED_FILE_DIR)/Pods-Internxt-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Internxt/Pods-Internxt-resources.sh\"\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
4DD8F6FF8D1F02CABA96BEB9 /* [CP] Check Pods Manifest.lock */ = {
99AFE0A7D54A7FE44ACF74F6 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Internxt/Pods-Internxt-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/EXConstants.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/EXUpdates/EXUpdates.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Internxt-checkManifestLockResult.txt",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXConstants.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXUpdates.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Internxt/Pods-Internxt-resources.sh\"\n";
showEnvVarsInLog = 0;
};
C0ABA4564B7F48269ACCB374 /* Upload Debug Symbols to Sentry */ = {
Expand Down Expand Up @@ -320,7 +320,7 @@
/* Begin XCBuildConfiguration section */
13B07F941A680F5B00A75B9A /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 8824BD7A75B06A5E02BBDE4D /* Pods-Internxt.debug.xcconfig */;
baseConfigurationReference = 83B954F6F743DE27490FED54 /* Pods-Internxt.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -357,7 +357,7 @@
};
13B07F951A680F5B00A75B9A /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 262CC3B19AC923BAF2E0DEAA /* Pods-Internxt.release.xcconfig */;
baseConfigurationReference = 3775BDE2EF396BB5E89C6A1A /* Pods-Internxt.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
Expand Down
Binary file modified ios/Internxt/Images.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Internxt/Images.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/Internxt/Images.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/Internxt/Images.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/Internxt/Images.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/Internxt/Images.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/Internxt/Images.xcassets/SplashScreen.imageset/image.png
2 changes: 1 addition & 1 deletion ios/Internxt/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.5.28</string>
<string>1.5.31</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/Internxt/Supporting/Expo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<string>production</string>
</dict>
<key>EXUpdatesRuntimeVersion</key>
<string>1.5.28</string>
<string>1.5.31</string>
<key>EXUpdatesURL</key>
<string>https://u.expo.dev/680f4feb-6315-4a50-93ec-36dcd0b831d2</string>
</dict>
Expand Down
27 changes: 15 additions & 12 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- ASN1Decoder (1.8.0)
- ASN1Decoder (1.9.0)
- boost (1.76.0)
- DoubleConversion (1.1.6)
- EASClient (0.4.1):
Expand Down Expand Up @@ -74,18 +74,21 @@ PODS:
- ReactCommon/turbomodule/core (= 0.70.8)
- fmt (6.2.1)
- glog (0.3.5)
- IDZSwiftCommonCrypto (0.13.0)
- IDZSwiftCommonCrypto (0.16.1)
- internxt-mobile-sdk (0.1.65):
- React-Core
- libwebp (1.2.4):
- libwebp/demux (= 1.2.4)
- libwebp/mux (= 1.2.4)
- libwebp/webp (= 1.2.4)
- libwebp/demux (1.2.4):
- libwebp (1.3.2):
- libwebp/demux (= 1.3.2)
- libwebp/mux (= 1.3.2)
- libwebp/sharpyuv (= 1.3.2)
- libwebp/webp (= 1.3.2)
- libwebp/demux (1.3.2):
- libwebp/webp
- libwebp/mux (1.2.4):
- libwebp/mux (1.3.2):
- libwebp/demux
- libwebp/webp (1.2.4)
- libwebp/sharpyuv (1.3.2)
- libwebp/webp (1.3.2):
- libwebp/sharpyuv
- Permission-AppTrackingTransparency (3.6.1):
- RNPermissions
- Permission-Camera (3.6.1):
Expand Down Expand Up @@ -776,7 +779,7 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/yoga"

SPEC CHECKSUMS:
ASN1Decoder: 6110fdeacfdb41559b1481457a1645be716610aa
ASN1Decoder: 4f4bbcaf1d1b8be56daa3280e82863a607f5bda9
boost: a7c83b31436843459a1961bfd74b96033dc77234
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
EASClient: 19efe9e8ef9b3917c5f3dcb3ed82319de4d8c0bd
Expand Down Expand Up @@ -810,9 +813,9 @@ SPEC CHECKSUMS:
FBReactNativeSpec: d8772db98ada3c2daf8f65e2105ada77bf209c02
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
IDZSwiftCommonCrypto: 00dd37cdfbd149312a7e5a582cf9909f8b129f44
IDZSwiftCommonCrypto: aefd3487b88dc3d7a1de2553188c720ac3194940
internxt-mobile-sdk: 7ea779ee16ce47812e7462365562b949b9f78c99
libwebp: f62cb61d0a484ba548448a4bd52aabf150ff6eef
libwebp: 1786c9f4ff8a279e4dac1e8f385004d5fc253009
Permission-AppTrackingTransparency: 9eedbc3b5a2907b8cb2c971461754616eac1661d
Permission-Camera: bf6791b17c7f614b6826019fcfdcc286d3a107f6
Permission-FaceID: e70223280292a1a5e4b8ad943b70cd9229a7d2c3
Expand Down
36 changes: 35 additions & 1 deletion src/contexts/Drive/Drive.context.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FetchFolderContentResponse } from '@internxt/sdk/dist/drive/storage/types';
import React, { useEffect, useState } from 'react';
import React, { useEffect, useRef, useState } from 'react';
import * as driveUseCases from '@internxt-mobile/useCases/drive';
import {
DriveItemData,
Expand All @@ -15,6 +15,10 @@ import errorService from '@internxt-mobile/services/ErrorService';
import { driveLocalDB } from '@internxt-mobile/services/drive/database';
import { BaseLogger } from '@internxt-mobile/services/common';

import { AppStateStatus, NativeEventSubscription } from 'react-native';
import appService from '@internxt-mobile/services/AppService';
import { getModifiedDriveItemsAndUpdateLocalCache } from './helpers';

type DriveFoldersTree = {
[folderId: number]:
| {
Expand Down Expand Up @@ -46,10 +50,31 @@ interface DriveContextProviderProps {
const logger = new BaseLogger({
tag: 'DRIVE_CONTEXT',
});

export const DriveContextProvider: React.FC<DriveContextProviderProps> = ({ children, rootFolderId }) => {
const [viewMode, setViewMode] = useState(DriveListViewMode.List);
const [driveFoldersTree, setDriveFoldersTree] = useState<DriveFoldersTree>({});
const [currentFolder, setCurrentFolder] = useState<FetchFolderContentResponseWithThumbnails | null>(null);
const currentFolderId = useRef<number | null>(null);
const onAppStateChangeListener = useRef<NativeEventSubscription | null>(null);
const handleAppStateChange = (state: AppStateStatus) => {
if (state === 'active' && currentFolderId.current) {
loadFolderContent(currentFolderId.current, { pullFrom: ['network'] }).catch((error) => {
errorService.reportError(error);
});
}
};

useEffect(() => {
onAppStateChangeListener.current = appService.onAppStateChange(handleAppStateChange);

return () => {
if (!onAppStateChangeListener.current) return;
onAppStateChangeListener.current.remove();
onAppStateChangeListener.current = null;
};
}, []);

useEffect(() => {
asyncStorageService.getItem(AsyncStorageKey.PreferredDriveViewMode).then((preferredDriveViewMode) => {
if (preferredDriveViewMode && preferredDriveViewMode !== viewMode) {
Expand Down Expand Up @@ -88,14 +113,22 @@ export const DriveContextProvider: React.FC<DriveContextProviderProps> = ({ chil
* 3. Network
*
*/

const loadFolderContent = async (folderId: number, options?: LoadFolderContentOptions) => {
const shouldPullFromCache = options?.pullFrom ? options?.pullFrom.includes('cache') : true;
const shouldPullFromNetwork = options?.pullFrom ? options?.pullFrom.includes('network') : true;

getModifiedDriveItemsAndUpdateLocalCache().catch((error) => {
errorService.reportError(error);
});

// 1. Check if we have the folder content in the DB
if (shouldPullFromCache) {
const folderContentFromDB = await driveLocalDB.getFolderContent(folderId);

if (folderContentFromDB) {
logger.info(`FOLDER-${folderId} - FROM CACHE`);

updateDriveFoldersTree({
folderId,
folderContent: folderContentFromDB,
Expand Down Expand Up @@ -144,6 +177,7 @@ export const DriveContextProvider: React.FC<DriveContextProviderProps> = ({ chil

if (shouldSetAsFocused && folderContent) {
setCurrentFolder(folderContent);
currentFolderId.current = folderId;
}
};

Expand Down
52 changes: 52 additions & 0 deletions src/contexts/Drive/helpers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import { driveFileService } from '@internxt-mobile/services/drive/file';
import { driveFolderService } from '@internxt-mobile/services/drive/folder';
import asyncStorageService from '@internxt-mobile/services/AsyncStorageService';
import { AsyncStorageKey } from '@internxt-mobile/types/index';
import { driveLocalDB } from '@internxt-mobile/services/drive/database';
import errorService from '@internxt-mobile/services/ErrorService';
import _ from 'lodash';

export const getModifiedDriveItemsAndUpdateLocalCache = async () => {
const lastUpdatedAt = (await asyncStorageService.getItem(AsyncStorageKey.LastUpdatedAt)) ?? new Date().toISOString();

const [modifiedFiles, modifiedFolders] = await Promise.all([
driveFileService.getModifiedFiles({
updatedAt: lastUpdatedAt,
status: 'ALL',
}),
driveFolderService.getModifiedFolders({
updatedAt: lastUpdatedAt,
status: 'ALL',
}),
]).catch((error) => {
errorService.reportError(error);
return [[], []];
});

if (!modifiedFiles || !modifiedFolders || (!modifiedFiles.length && !modifiedFolders.length)) return;

const modifiedFilesIds = modifiedFiles.map((file) => file.id);
const modifiedFoldersIds = modifiedFolders.map((folder) => folder.id);

for (const modifiedFileId of modifiedFilesIds) {
await driveLocalDB.deleteItem({ id: modifiedFileId });
}

for (const modifiedFolderId of modifiedFoldersIds) {
await driveLocalDB.deleteFolderRecord(modifiedFolderId);
}

// Get the last updatedAt date from the modified files and folders
let lastUpdatedAtFromModifiedFiles;
let lastUpdatedAtFromModifiedFolders;

if (modifiedFiles.length) lastUpdatedAtFromModifiedFiles = _.maxBy(modifiedFiles, 'updatedAt')?.updatedAt;

if (modifiedFolders.length)
lastUpdatedAtFromModifiedFolders = _.maxBy(modifiedFolders, 'updatedAt')?.updatedAt.toString();

// Get the most recent date
const newLastUpdatedAt = _.max([lastUpdatedAtFromModifiedFiles, lastUpdatedAtFromModifiedFolders]);

await asyncStorageService.saveItem(AsyncStorageKey.LastUpdatedAt, newLastUpdatedAt ?? new Date().toISOString());
};
Loading

0 comments on commit 560d789

Please sign in to comment.