Push react native to 0.73.6 (#7863)

* Bump react native to 0.73.6

* iOS changes

* Fix gallery

* Fix test

* Add missing patch

* Unify react native navigation patch

* Update the rest of libraries

* iOS updates

* Update mattermost libraries

* Fix tests and final bumps

* iOS podfile update

* Update android locks

* Revert webrtc update because it was messing with the tests

* Update podfile for webrtc
This commit is contained in:
Daniel Espino García 2024-04-22 12:44:39 +02:00 committed by GitHub
parent ca7915e2e3
commit 9d1030a445
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
57 changed files with 4316 additions and 4377 deletions

View file

@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
sh ./scripts/pre-commit.sh

View file

@ -1,6 +1,6 @@
apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"
apply plugin: 'kotlin-android'
/**
* This is the configuration block to customize your React Native Android app.
@ -190,13 +190,8 @@ repositories {
dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
implementation("com.facebook.react:flipper-integration")
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.squareup.okhttp3', module:'okhttp'
}
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {

View file

@ -2,8 +2,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<application
android:usesCleartextTraffic="true"
tools:targetApi="28"

View file

@ -1,63 +0,0 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package com.mattermost.flipper;
import android.content.Context;
import com.facebook.flipper.android.AndroidFlipperClient;
import com.facebook.flipper.android.utils.FlipperUtils;
import com.facebook.flipper.core.FlipperClient;
import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
import com.facebook.flipper.plugins.inspector.DescriptorMapping;
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
import com.facebook.react.ReactInstanceEventListener;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.modules.network.NetworkingModule;
import com.mattermost.networkclient.RCTOkHttpClientFactory;
/**
* Class responsible of loading Flipper inside your React Native application. This is the debug
* flavor of it. Here you can add your own plugins and customize the Flipper setup.
*/
public class ReactNativeFlipper {
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
if (FlipperUtils.shouldEnableFlipper(context)) {
final FlipperClient client = AndroidFlipperClient.getInstance(context);
client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
client.addPlugin(new DatabasesFlipperPlugin(context));
client.addPlugin(new SharedPreferencesFlipperPlugin(context));
client.addPlugin(CrashReporterPlugin.getInstance());
NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
RCTOkHttpClientFactory.Companion.setFlipperPlugin(networkFlipperPlugin);
NetworkingModule.setCustomClientBuilder(
builder -> builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)));
client.addPlugin(networkFlipperPlugin);
client.start();
// Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
// Hence we run if after all native modules have been initialized
ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
if (reactContext == null) {
reactInstanceManager.addReactInstanceEventListener(
new ReactInstanceEventListener() {
@Override
public void onReactContextInitialized(ReactContext reactContext) {
reactInstanceManager.removeReactInstanceEventListener(this);
reactContext.runOnNativeModulesQueueThread(
() -> client.addPlugin(new FrescoFlipperPlugin()));
}
});
} else {
client.addPlugin(new FrescoFlipperPlugin());
}
}
}
}

View file

@ -1,106 +0,0 @@
package com.mattermost.rnbeta;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.view.KeyEvent;
import android.content.res.Configuration;
import com.facebook.react.ReactActivityDelegate;
import com.reactnativenavigation.NavigationActivity;
import com.github.emilioicai.hwkeyboardevent.HWKeyboardEventModule;
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
import com.facebook.react.defaults.DefaultReactActivityDelegate;
import java.util.Objects;
public class MainActivity extends NavigationActivity {
private boolean HWKeyboardConnected = false;
private final FoldableObserver foldableObserver = FoldableObserver.Companion.getInstance(this);
@Override
protected String getMainComponentName() {
return "Mattermost";
}
/**
* Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link
* DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React
* (aka React 18) with two boolean flags.
*/
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
return new DefaultReactActivityDelegate(
this,
Objects.requireNonNull(getMainComponentName()),
// If you opted-in for the New Architecture, we enable the Fabric Renderer.
DefaultNewArchitectureEntryPoint.getFabricEnabled());
}
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(null);
setContentView(R.layout.launch_screen);
setHWKeyboardConnected();
foldableObserver.onCreate();
}
@Override
protected void onStart() {
super.onStart();
foldableObserver.onStart();
}
@Override
protected void onStop() {
super.onStop();
foldableObserver.onStop();
}
@Override
public void onConfigurationChanged(@NonNull Configuration newConfig) {
super.onConfigurationChanged(newConfig);
if (newConfig.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO) {
HWKeyboardConnected = true;
} else if (newConfig.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_YES) {
HWKeyboardConnected = false;
}
}
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
getReactGateway().onWindowFocusChanged(hasFocus);
}
/*
https://mattermost.atlassian.net/browse/MM-10601
Required by react-native-hw-keyboard-event
(https://github.com/emilioicai/react-native-hw-keyboard-event)
*/
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
if (HWKeyboardConnected) {
int keyCode = event.getKeyCode();
int keyAction = event.getAction();
if (keyAction == KeyEvent.ACTION_UP) {
if (keyCode == KeyEvent.KEYCODE_ENTER) {
String keyPressed = event.isShiftPressed() ? "shift-enter" : "enter";
HWKeyboardEventModule.getInstance().keyPressed(keyPressed);
return true;
} else if (keyCode == KeyEvent.KEYCODE_K && event.isCtrlPressed()) {
HWKeyboardEventModule.getInstance().keyPressed("find-channels");
return true;
}
}
}
return super.dispatchKeyEvent(event);
}
private void setHWKeyboardConnected() {
HWKeyboardConnected = getResources().getConfiguration().keyboard == Configuration.KEYBOARD_QWERTY;
}
}

View file

@ -0,0 +1,89 @@
package com.mattermost.rnbeta
import android.os.Bundle
import android.view.KeyEvent
import android.content.res.Configuration
import com.facebook.react.ReactActivityDelegate
import com.reactnativenavigation.NavigationActivity
import com.github.emilioicai.hwkeyboardevent.HWKeyboardEventModule
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint
import com.facebook.react.defaults.DefaultReactActivityDelegate
class MainActivity : NavigationActivity() {
private var HWKeyboardConnected = false
private val foldableObserver = FoldableObserver.getInstance(this)
/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
override fun getMainComponentName(): String = "Mattermost"
/**
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
*/
override fun createReactActivityDelegate(): ReactActivityDelegate =
DefaultReactActivityDelegate(this, mainComponentName, DefaultNewArchitectureEntryPoint.fabricEnabled)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(null)
setContentView(R.layout.launch_screen)
setHWKeyboardConnected()
foldableObserver.onCreate()
}
override fun onStart() {
super.onStart()
foldableObserver.onStart()
}
override fun onStop() {
super.onStop()
foldableObserver.onStop()
}
override fun onConfigurationChanged(newConfig: Configuration) {
super.onConfigurationChanged(newConfig)
if (newConfig.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO) {
HWKeyboardConnected = true
} else if (newConfig.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_YES) {
HWKeyboardConnected = false
}
}
override fun onWindowFocusChanged(hasFocus: Boolean) {
super.onWindowFocusChanged(hasFocus)
reactGateway.onWindowFocusChanged(hasFocus)
}
/*
https://mattermost.atlassian.net/browse/MM-10601
Required by react-native-hw-keyboard-event
(https://github.com/emilioicai/react-native-hw-keyboard-event)
*/
override fun dispatchKeyEvent(event: KeyEvent): Boolean {
if (HWKeyboardConnected) {
val keyCode = event.keyCode
val keyAction = event.action
if (keyAction == KeyEvent.ACTION_UP) {
if (keyCode == KeyEvent.KEYCODE_ENTER) {
val keyPressed = if (event.isShiftPressed) "shift-enter" else "enter"
HWKeyboardEventModule.getInstance().keyPressed(keyPressed)
return true
} else if (keyCode == KeyEvent.KEYCODE_K && event.isCtrlPressed) {
HWKeyboardEventModule.getInstance().keyPressed("find-channels")
return true
}
}
}
return super.dispatchKeyEvent(event)
}
private fun setHWKeyboardConnected() {
HWKeyboardConnected = getResources().configuration.keyboard == Configuration.KEYBOARD_QWERTY
}
}

View file

@ -1,161 +0,0 @@
package com.mattermost.rnbeta;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import java.io.File;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.mattermost.helpers.RealPathUtil;
import com.mattermost.share.ShareModule;
import com.wix.reactnativenotifications.RNNotificationsPackage;
import com.reactnativenavigation.NavigationApplication;
import com.wix.reactnativenotifications.core.notification.INotificationsApplication;
import com.wix.reactnativenotifications.core.notification.IPushNotification;
import com.wix.reactnativenotifications.core.AppLaunchHelper;
import com.wix.reactnativenotifications.core.AppLifecycleFacade;
import com.wix.reactnativenotifications.core.JsIOHelper;
import com.facebook.react.PackageList;
import com.facebook.react.ReactPackage;
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
import com.facebook.react.defaults.DefaultReactNativeHost;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.TurboReactPackage;
import com.facebook.react.bridge.JSIModuleSpec;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.JSIModulePackage;
import com.facebook.react.module.model.ReactModuleInfo;
import com.facebook.react.module.model.ReactModuleInfoProvider;
import com.facebook.react.modules.network.OkHttpClientProvider;
import com.facebook.soloader.SoLoader;
import com.mattermost.flipper.ReactNativeFlipper;
import com.mattermost.networkclient.RCTOkHttpClientFactory;
import com.nozbe.watermelondb.jsi.WatermelonDBJSIPackage;
public class MainApplication extends NavigationApplication implements INotificationsApplication {
public static MainApplication instance;
public Boolean sharedExtensionIsOpened = false;
private final ReactNativeHost mReactNativeHost =
new DefaultReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
List<ReactPackage> packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
packages.add(new RNNotificationsPackage(MainApplication.this));
packages.add(
new TurboReactPackage() {
@Override
public NativeModule getModule(String name, ReactApplicationContext reactContext) {
switch (name) {
case "MattermostManaged":
return MattermostManagedModule.getInstance(reactContext);
case "MattermostShare":
return ShareModule.getInstance(reactContext);
case "Notifications":
return NotificationsModule.getInstance(instance, reactContext);
case "SplitView":
return SplitViewModule.Companion.getInstance(reactContext);
default:
throw new IllegalArgumentException("Could not find module " + name);
}
}
@Override
public ReactModuleInfoProvider getReactModuleInfoProvider() {
return () -> {
Map<String, ReactModuleInfo> map = new HashMap<>();
map.put("MattermostManaged", new ReactModuleInfo("MattermostManaged", "com.mattermost.rnbeta.MattermostManagedModule", false, false, false, false, false));
map.put("MattermostShare", new ReactModuleInfo("MattermostShare", "com.mattermost.share.ShareModule", false, false, true, false, false));
map.put("Notifications", new ReactModuleInfo("Notifications", "com.mattermost.rnbeta.NotificationsModule", false, false, false, false, false));
map.put("SplitView", new ReactModuleInfo("SplitView", "com.mattermost.rnbeta.SplitViewModule", false, false, false, false, false));
return map;
};
}
}
);
return packages;
}
@Override
protected JSIModulePackage getJSIModulePackage() {
return (reactApplicationContext, jsContext) -> {
List<JSIModuleSpec> modules = Collections.emptyList();
modules.addAll(new WatermelonDBJSIPackage().getJSIModules(reactApplicationContext, jsContext));
return modules;
};
}
@Override
protected String getJSMainModuleName() {
return "index";
}
@Override
protected boolean isNewArchEnabled() {
return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
}
@Override
protected Boolean isHermesEnabled() {
return BuildConfig.IS_HERMES_ENABLED;
}
};
@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}
@Override
public void onCreate() {
super.onCreate();
instance = this;
Context context = getApplicationContext();
// Delete any previous temp files created by the app
File tempFolder = new File(context.getCacheDir(), RealPathUtil.CACHE_DIR_NAME);
RealPathUtil.deleteTempFiles(tempFolder);
Log.i("ReactNative", "Cleaning temp cache " + tempFolder.getAbsolutePath());
// Tells React Native to use our RCTOkHttpClientFactory which builds an OKHttpClient
// with a cookie jar defined in APIClientModule and an interceptor to intercept all
// requests that originate from React Native's OKHttpClient
OkHttpClientProvider.setOkHttpClientFactory(new RCTOkHttpClientFactory());
SoLoader.init(this, /* native exopackage */ false);
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
DefaultNewArchitectureEntryPoint.load();
}
ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
}
@Override
public IPushNotification getPushNotification(Context context, Bundle bundle, AppLifecycleFacade defaultFacade, AppLaunchHelper defaultAppLaunchHelper) {
return new CustomPushNotification(
context,
bundle,
defaultFacade,
defaultAppLaunchHelper,
new JsIOHelper()
);
}
}

View file

@ -0,0 +1,183 @@
package com.mattermost.rnbeta
import android.content.Context
import android.os.Bundle
import android.util.Log
import com.facebook.react.PackageList
import com.facebook.react.ReactHost
import com.facebook.react.ReactNativeHost
import com.facebook.react.ReactPackage
import com.facebook.react.TurboReactPackage
import com.facebook.react.bridge.JSIModulePackage
import com.facebook.react.bridge.JSIModuleSpec
import com.facebook.react.bridge.JavaScriptContextHolder
import com.facebook.react.bridge.NativeModule
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.react.flipper.ReactNativeFlipper
import com.facebook.react.module.model.ReactModuleInfo
import com.facebook.react.module.model.ReactModuleInfoProvider
import com.facebook.react.modules.network.OkHttpClientProvider
import com.facebook.soloader.SoLoader
import com.mattermost.helpers.RealPathUtil
import com.mattermost.networkclient.RCTOkHttpClientFactory
import com.mattermost.share.ShareModule
import com.nozbe.watermelondb.jsi.WatermelonDBJSIPackage
import com.reactnativenavigation.NavigationApplication
import com.wix.reactnativenotifications.RNNotificationsPackage
import com.wix.reactnativenotifications.core.AppLaunchHelper
import com.wix.reactnativenotifications.core.AppLifecycleFacade
import com.wix.reactnativenotifications.core.JsIOHelper
import com.wix.reactnativenotifications.core.notification.INotificationsApplication
import com.wix.reactnativenotifications.core.notification.IPushNotification
import java.io.File
class MainApplication : NavigationApplication(), INotificationsApplication {
var instance: MainApplication? = null
var sharedExtensionIsOpened = false
override val reactNativeHost: ReactNativeHost =
object : DefaultReactNativeHost(this) {
override fun getPackages(): List<ReactPackage> =
PackageList(this).packages.apply {
// Packages that cannot be autolinked yet can be added manually here, for example:
// add(MyReactNativePackage())
add(RNNotificationsPackage(this@MainApplication))
add(object : TurboReactPackage() {
override fun getModule(
name: String,
reactContext: ReactApplicationContext
): NativeModule {
return when (name) {
"MattermostManaged" -> MattermostManagedModule.getInstance(
reactContext
)
"MattermostShare" -> ShareModule.getInstance(reactContext)
"Notifications" -> NotificationsModule.getInstance(
instance,
reactContext
)
"SplitView" -> SplitViewModule.getInstance(
reactContext
)
else ->
throw IllegalArgumentException("Could not find module $name")
}
}
override fun getReactModuleInfoProvider(): ReactModuleInfoProvider {
return ReactModuleInfoProvider {
val map: MutableMap<String, ReactModuleInfo> = java.util.HashMap()
map["MattermostManaged"] = ReactModuleInfo(
"MattermostManaged",
"com.mattermost.rnbeta.MattermostManagedModule",
false,
false,
false,
false
)
map["MattermostShare"] = ReactModuleInfo(
"MattermostShare",
"com.mattermost.share.ShareModule",
false,
false,
false,
false
)
map["Notifications"] = ReactModuleInfo(
"Notifications",
"com.mattermost.rnbeta.NotificationsModule",
false,
false,
false,
false
)
map["SplitView"] = ReactModuleInfo(
"SplitView",
"com.mattermost.rnbeta.SplitViewModule",
false,
false,
false,
false
)
map
}
}
})
}
override fun getJSIModulePackage(): JSIModulePackage {
return JSIModulePackage { reactApplicationContext: ReactApplicationContext?, jsContext: JavaScriptContextHolder? ->
val modules =
mutableListOf<JSIModuleSpec<*>>()
modules.addAll(
WatermelonDBJSIPackage().getJSIModules(
reactApplicationContext,
jsContext
)
)
modules
}
}
override fun getJSMainModuleName(): String = "index"
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
}
override val reactHost: ReactHost
get() = getDefaultReactHost(this.applicationContext, reactNativeHost)
override fun onCreate() {
super.onCreate()
instance = this
val context: Context = applicationContext
// Delete any previous temp files created by the app
val tempFolder = File(context.cacheDir, RealPathUtil.CACHE_DIR_NAME)
RealPathUtil.deleteTempFiles(tempFolder)
Log.i("ReactNative", "Cleaning temp cache " + tempFolder.absolutePath)
// Tells React Native to use our RCTOkHttpClientFactory which builds an OKHttpClient
// with a cookie jar defined in APIClientModule and an interceptor to intercept all
// requests that originate from React Native's OKHttpClient
// Tells React Native to use our RCTOkHttpClientFactory which builds an OKHttpClient
// with a cookie jar defined in APIClientModule and an interceptor to intercept all
// requests that originate from React Native's OKHttpClient
OkHttpClientProvider.setOkHttpClientFactory(RCTOkHttpClientFactory())
SoLoader.init(this, false)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
}
ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
}
override fun getPushNotification(
context: Context?,
bundle: Bundle?,
defaultFacade: AppLifecycleFacade?,
defaultAppLaunchHelper: AppLaunchHelper?
): IPushNotification {
return CustomPushNotification(
context,
bundle,
defaultFacade,
defaultAppLaunchHelper,
JsIOHelper()
)
}
}

View file

@ -15,6 +15,6 @@ public class ShareActivity extends ReactActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
MainApplication app = (MainApplication) this.getApplication();
app.sharedExtensionIsOpened = true;
app.setSharedExtensionIsOpened(true);
}
}

View file

@ -100,7 +100,7 @@ public class ShareModule extends ReactContextBaseJavaModule {
public Map<String, Object> getConstants() {
HashMap<String, Object> constants = new HashMap<>(1);
constants.put("cacheDirName", RealPathUtil.CACHE_DIR_NAME);
constants.put("isOpened", mApplication.sharedExtensionIsOpened);
constants.put("isOpened", mApplication.getSharedExtensionIsOpened());
return constants;
}
@ -130,7 +130,7 @@ public class ShareModule extends ReactContextBaseJavaModule {
}
}
mApplication.sharedExtensionIsOpened = false;
mApplication.setSharedExtensionIsOpened(false);
RealPathUtil.deleteTempFiles(this.tempFolder);
}

View file

@ -1,19 +0,0 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package com.mattermost.flipper;
import android.content.Context;
import com.facebook.react.ReactInstanceManager;
/**
* Class responsible of loading Flipper inside your React Native application. This is the release
* flavor of it so it's empty as we don't want to load Flipper.
*/
public class ReactNativeFlipper {
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
// Do nothing as we don't want to initialize Flipper on Release.
}
}

View file

@ -1,19 +1,15 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "33.0.0"
buildToolsVersion = "34.0.0"
minSdkVersion = 24
compileSdkVersion = 33
targetSdkVersion = 33
compileSdkVersion = 34
targetSdkVersion = 34
supportLibVersion = "33.0.0"
kotlinVersion = "1.8.21"
kotlin_version = kotlinVersion
RNNKotlinVersion = kotlinVersion
firebaseVersion = "23.3.1"
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
ndkVersion = "23.1.7779620"
ndkVersion = "25.1.8937393"
}
repositories {
mavenCentral()
@ -61,6 +57,8 @@ subprojects {
}
}
apply plugin: "com.facebook.react.rootproject"
dependencyLocking {
lockAllConfigurations()
}

View file

@ -1,64 +1,67 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
androidx.databinding:databinding-common:7.4.2=classpath
androidx.databinding:databinding-compiler-common:7.4.2=classpath
com.android.databinding:baseLibrary:7.4.2=classpath
com.android.tools.analytics-library:crash:30.4.2=classpath
com.android.tools.analytics-library:protos:30.4.2=classpath
com.android.tools.analytics-library:shared:30.4.2=classpath
com.android.tools.analytics-library:tracker:30.4.2=classpath
androidx.databinding:databinding-common:8.1.1=classpath
androidx.databinding:databinding-compiler-common:8.1.1=classpath
com.android.databinding:baseLibrary:8.1.1=classpath
com.android.tools.analytics-library:crash:31.1.1=classpath
com.android.tools.analytics-library:protos:31.1.1=classpath
com.android.tools.analytics-library:shared:31.1.1=classpath
com.android.tools.analytics-library:tracker:31.1.1=classpath
com.android.tools.build.jetifier:jetifier-core:1.0.0-beta10=classpath
com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta10=classpath
com.android.tools.build:aapt2-proto:7.4.2-8841542=classpath
com.android.tools.build:aaptcompiler:7.4.2=classpath
com.android.tools.build:apksig:7.4.2=classpath
com.android.tools.build:apkzlib:7.4.2=classpath
com.android.tools.build:builder-model:7.4.2=classpath
com.android.tools.build:builder-test-api:7.4.2=classpath
com.android.tools.build:builder:7.4.2=classpath
com.android.tools.build:bundletool:1.11.4=classpath
com.android.tools.build:gradle-api:7.4.2=classpath
com.android.tools.build:gradle-settings-api:7.4.2=classpath
com.android.tools.build:gradle:7.4.2=classpath
com.android.tools.build:manifest-merger:30.4.2=classpath
com.android.tools.build:aapt2-proto:8.1.1-10154469=classpath
com.android.tools.build:aaptcompiler:8.1.1=classpath
com.android.tools.build:apksig:8.1.1=classpath
com.android.tools.build:apkzlib:8.1.1=classpath
com.android.tools.build:builder-model:8.1.1=classpath
com.android.tools.build:builder-test-api:8.1.1=classpath
com.android.tools.build:builder:8.1.1=classpath
com.android.tools.build:bundletool:1.14.0=classpath
com.android.tools.build:gradle-api:8.1.1=classpath
com.android.tools.build:gradle-settings-api:8.1.1=classpath
com.android.tools.build:gradle:8.1.1=classpath
com.android.tools.build:manifest-merger:31.1.1=classpath
com.android.tools.build:transform-api:2.0.0-deprecated-use-gradle-api=classpath
com.android.tools.ddms:ddmlib:30.4.2=classpath
com.android.tools.layoutlib:layoutlib-api:30.4.2=classpath
com.android.tools.lint:lint-model:30.4.2=classpath
com.android.tools.lint:lint-typedef-remover:30.4.2=classpath
com.android.tools.utp:android-device-provider-ddmlib-proto:30.4.2=classpath
com.android.tools.utp:android-device-provider-gradle-proto:30.4.2=classpath
com.android.tools.utp:android-test-plugin-host-additional-test-output-proto:30.4.2=classpath
com.android.tools.utp:android-test-plugin-host-coverage-proto:30.4.2=classpath
com.android.tools.utp:android-test-plugin-host-retention-proto:30.4.2=classpath
com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.4.2=classpath
com.android.tools:annotations:30.4.2=classpath
com.android.tools:common:30.4.2=classpath
com.android.tools:dvlib:30.4.2=classpath
com.android.tools:repository:30.4.2=classpath
com.android.tools:sdk-common:30.4.2=classpath
com.android.tools:sdklib:30.4.2=classpath
com.android:signflinger:7.4.2=classpath
com.android:zipflinger:7.4.2=classpath
com.android.tools.ddms:ddmlib:31.1.1=classpath
com.android.tools.layoutlib:layoutlib-api:31.1.1=classpath
com.android.tools.lint:lint-model:31.1.1=classpath
com.android.tools.lint:lint-typedef-remover:31.1.1=classpath
com.android.tools.utp:android-device-provider-ddmlib-proto:31.1.1=classpath
com.android.tools.utp:android-device-provider-gradle-proto:31.1.1=classpath
com.android.tools.utp:android-test-plugin-host-additional-test-output-proto:31.1.1=classpath
com.android.tools.utp:android-test-plugin-host-apk-installer-proto:31.1.1=classpath
com.android.tools.utp:android-test-plugin-host-coverage-proto:31.1.1=classpath
com.android.tools.utp:android-test-plugin-host-emulator-control-proto:31.1.1=classpath
com.android.tools.utp:android-test-plugin-host-logcat-proto:31.1.1=classpath
com.android.tools.utp:android-test-plugin-host-retention-proto:31.1.1=classpath
com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:31.1.1=classpath
com.android.tools:annotations:31.1.1=classpath
com.android.tools:common:31.1.1=classpath
com.android.tools:dvlib:31.1.1=classpath
com.android.tools:repository:31.1.1=classpath
com.android.tools:sdk-common:31.1.1=classpath
com.android.tools:sdklib:31.1.1=classpath
com.android:signflinger:8.1.1=classpath
com.android:zipflinger:8.1.1=classpath
com.google.android.gms:strict-version-matcher-plugin:1.2.4=classpath
com.google.android:annotations:4.1.1.4=classpath
com.google.api.grpc:proto-google-common-protos:2.0.1=classpath
com.google.auto.value:auto-value-annotations:1.6.2=classpath
com.google.code.findbugs:jsr305:3.0.2=classpath
com.google.code.gson:gson:2.8.9=classpath
com.google.crypto.tink:tink:1.3.0-rc2=classpath
com.google.crypto.tink:tink:1.7.0=classpath
com.google.dagger:dagger:2.28.3=classpath
com.google.errorprone:error_prone_annotations:2.7.1=classpath
com.google.errorprone:error_prone_annotations:2.11.0=classpath
com.google.flatbuffers:flatbuffers-java:1.12.0=classpath
com.google.gms:google-services:4.4.0=classpath
com.google.guava:failureaccess:1.0.1=classpath
com.google.guava:guava:31.0.1-jre=classpath
com.google.guava:guava:31.1-jre=classpath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=classpath
com.google.j2objc:j2objc-annotations:1.3=classpath
com.google.jimfs:jimfs:1.1=classpath
com.google.protobuf:protobuf-java-util:3.17.2=classpath
com.google.protobuf:protobuf-java:3.17.2=classpath
com.google.protobuf:protobuf-java-util:3.19.3=classpath
com.google.protobuf:protobuf-java:3.19.3=classpath
com.google.testing.platform:core-proto:0.0.8-alpha08=classpath
com.googlecode.juniversalchardet:juniversalchardet:1.0.3=classpath
com.squareup:javapoet:1.13.0=classpath
@ -69,23 +72,24 @@ com.sun.xml.fastinfoset:FastInfoset:1.2.16=classpath
commons-codec:commons-codec:1.11=classpath
commons-io:commons-io:2.4=classpath
commons-logging:commons-logging:1.2=classpath
io.grpc:grpc-api:1.39.0=classpath
io.grpc:grpc-context:1.39.0=classpath
io.grpc:grpc-core:1.39.0=classpath
io.grpc:grpc-netty:1.39.0=classpath
io.grpc:grpc-protobuf-lite:1.39.0=classpath
io.grpc:grpc-protobuf:1.39.0=classpath
io.grpc:grpc-stub:1.39.0=classpath
io.netty:netty-buffer:4.1.52.Final=classpath
io.netty:netty-codec-http2:4.1.52.Final=classpath
io.netty:netty-codec-http:4.1.52.Final=classpath
io.netty:netty-codec-socks:4.1.52.Final=classpath
io.netty:netty-codec:4.1.52.Final=classpath
io.netty:netty-common:4.1.52.Final=classpath
io.netty:netty-handler-proxy:4.1.52.Final=classpath
io.netty:netty-handler:4.1.52.Final=classpath
io.netty:netty-resolver:4.1.52.Final=classpath
io.netty:netty-transport:4.1.52.Final=classpath
io.grpc:grpc-api:1.45.1=classpath
io.grpc:grpc-context:1.45.1=classpath
io.grpc:grpc-core:1.45.1=classpath
io.grpc:grpc-netty:1.45.1=classpath
io.grpc:grpc-protobuf-lite:1.45.1=classpath
io.grpc:grpc-protobuf:1.45.1=classpath
io.grpc:grpc-stub:1.45.1=classpath
io.netty:netty-buffer:4.1.72.Final=classpath
io.netty:netty-codec-http2:4.1.72.Final=classpath
io.netty:netty-codec-http:4.1.72.Final=classpath
io.netty:netty-codec-socks:4.1.72.Final=classpath
io.netty:netty-codec:4.1.72.Final=classpath
io.netty:netty-common:4.1.72.Final=classpath
io.netty:netty-handler-proxy:4.1.72.Final=classpath
io.netty:netty-handler:4.1.72.Final=classpath
io.netty:netty-resolver:4.1.72.Final=classpath
io.netty:netty-tcnative-classes:2.0.46.Final=classpath
io.netty:netty-transport:4.1.72.Final=classpath
io.perfmark:perfmark-api:0.23.0=classpath
jakarta.activation:jakarta.activation-api:1.2.1=classpath
jakarta.xml.bind:jakarta.xml.bind-api:2.3.2=classpath
@ -95,9 +99,9 @@ net.java.dev.jna:jna-platform:5.6.0=classpath
net.java.dev.jna:jna:5.6.0=classpath
net.sf.jopt-simple:jopt-simple:4.9=classpath
net.sf.kxml:kxml2:2.3.0=classpath
org.apache.commons:commons-compress:1.20=classpath
org.apache.commons:commons-compress:1.21=classpath
org.apache.httpcomponents:httpclient:4.5.13=classpath
org.apache.httpcomponents:httpcore:4.4.13=classpath
org.apache.httpcomponents:httpcore:4.4.15=classpath
org.apache.httpcomponents:httpmime:4.5.6=classpath
org.bitbucket.b_c:jose4j:0.7.0=classpath
org.bouncycastle:bcpkix-jdk15on:1.67=classpath
@ -124,21 +128,20 @@ org.jetbrains.kotlin:kotlin-gradle-plugins-bom:1.8.21=classpath
org.jetbrains.kotlin:kotlin-klib-commonizer-api:1.8.21=classpath
org.jetbrains.kotlin:kotlin-native-utils:1.8.21=classpath
org.jetbrains.kotlin:kotlin-project-model:1.8.21=classpath
org.jetbrains.kotlin:kotlin-reflect:1.7.10=classpath
org.jetbrains.kotlin:kotlin-reflect:1.8.20-RC2=classpath
org.jetbrains.kotlin:kotlin-scripting-common:1.8.21=classpath
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.8.21=classpath
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.8.21=classpath
org.jetbrains.kotlin:kotlin-scripting-jvm:1.8.21=classpath
org.jetbrains.kotlin:kotlin-stdlib-common:1.7.22=classpath
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.22=classpath
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.22=classpath
org.jetbrains.kotlin:kotlin-stdlib:1.7.22=classpath
org.jetbrains.kotlin:kotlin-stdlib-common:1.8.20-RC2=classpath
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.20-RC2=classpath
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.20-RC2=classpath
org.jetbrains.kotlin:kotlin-stdlib:1.8.20-RC2=classpath
org.jetbrains.kotlin:kotlin-tooling-core:1.8.21=classpath
org.jetbrains.kotlin:kotlin-util-io:1.8.21=classpath
org.jetbrains.kotlin:kotlin-util-klib:1.8.21=classpath
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.0=classpath
org.jetbrains:annotations:13.0=classpath
org.json:json:20180813=classpath
org.jvnet.staxex:stax-ex:1.8.1=classpath
org.ow2.asm:asm-analysis:9.2=classpath
org.ow2.asm:asm-commons:9.2=classpath

View file

@ -28,9 +28,6 @@ android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.182.0
# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
# ./gradlew <task> -PreactNativeArchitectures=x86_64

Binary file not shown.

View file

@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

15
android/gradlew vendored
View file

@ -83,10 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
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.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@ -133,10 +131,13 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
@ -197,6 +198,10 @@ if "$cygwin" || "$msys" ; then
done
fi
# 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"'
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in

View file

@ -0,0 +1,4 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
empty=incomingCatalogForLibs0

View file

@ -26,11 +26,6 @@ exports[`AttachmentAuthor it matches snapshot when both name and icon are provid
<FastImageView
defaultSource={null}
resizeMode="cover"
source={
{
"uri": "https://images.com/image.png",
}
}
style={
{
"bottom": 0,
@ -87,11 +82,6 @@ exports[`AttachmentAuthor it matches snapshot when only icon is provided 1`] = `
<FastImageView
defaultSource={null}
resizeMode="cover"
source={
{
"uri": "https://images.com/image.png",
}
}
style={
{
"bottom": 0,

View file

@ -28,11 +28,6 @@ exports[`AttachmentFooter it matches snapshot when both footer and footer_icon a
<FastImageView
defaultSource={null}
resizeMode="cover"
source={
{
"uri": "https://images.com/image.png",
}
}
style={
{
"bottom": 0,

View file

@ -9,6 +9,8 @@ import TestHelper from '@test/test_helper';
import {SystemMessage} from './system_message';
jest.mock('@react-native-clipboard/clipboard', () => ({}));
const baseProps = {
author: {
id: 'me',

View file

@ -25,7 +25,6 @@ type Props = {
url?: string;
};
// @ts-expect-error FastImage does work with Animated.createAnimatedComponent
const AnimatedFastImage = Animated.createAnimatedComponent(FastImage);
const AnimatedImage = Animated.createAnimatedComponent(RNImage);

View file

@ -16,7 +16,6 @@ import type {ImageStyles} from '@typings/global/styles';
const AnimatedImageBackground = Animated.createAnimatedComponent(ImageBackground);
// @ts-expect-error FastImage does work with Animated.createAnimatedComponent
const AnimatedFastImage = Animated.createAnimatedComponent(FastImage);
const AnimatedImage = Animated.createAnimatedComponent(Image);

View file

@ -6,7 +6,6 @@ import {Image, type ColorValue, type StyleProp, type ImageStyle} from 'react-nat
import FastImage, {type ImageStyle as FastImageStyle, type Source} from 'react-native-fast-image';
import Animated, {type SharedValue} from 'react-native-reanimated';
// @ts-expect-error FastImage does work with Animated.createAnimatedComponent
const AnimatedFastImage = Animated.createAnimatedComponent(FastImage);
const AnimatedImage = Animated.createAnimatedComponent(Image);

View file

@ -1,10 +1,10 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {useCallback, useEffect, useRef} from 'react';
import {useCallback, useEffect} from 'react';
import {Platform} from 'react-native';
import {
Easing, makeRemote, runOnJS, useAnimatedRef, useAnimatedStyle, useEvent,
Easing, runOnJS, useAnimatedRef, useAnimatedStyle, useEvent,
useSharedValue,
withTiming, type WithTimingConfig,
} from 'react-native-reanimated';
@ -14,18 +14,6 @@ import {useGallery} from '@context/gallery';
import type {Context, GestureHandlers, OnGestureEvent} from '@typings/screens/gallery';
import type {GestureHandlerGestureEvent} from 'react-native-gesture-handler';
function useRemoteContext<T extends object>(initialValue: T) {
const initRef = useRef<{ context: T } | null>(null);
if (initRef.current === null) {
initRef.current = {
context: makeRemote(initialValue ?? {}),
};
}
const {context} = initRef.current;
return context;
}
function diff(context: any, name: string, value: any) {
'worklet';
@ -49,9 +37,10 @@ function diff(context: any, name: string, value: any) {
}
export function useCreateAnimatedGestureHandler<T extends GestureHandlerGestureEvent, TContext extends Context>(handlers: GestureHandlers<T['nativeEvent'], TContext>) {
const context = useRemoteContext<any>({
const sharedContext = useSharedValue<any>({
__initialized: false,
});
const isAndroid = Platform.OS === 'android';
const handler = (event: T['nativeEvent']) => {
@ -63,6 +52,7 @@ export function useCreateAnimatedGestureHandler<T extends GestureHandlerGestureE
const ACTIVE = 4;
const END = 5;
const context = sharedContext.value;
if (handlers.onInit && !context.__initialized) {
context.__initialized = true;
handlers.onInit(event, context);
@ -158,7 +148,7 @@ export function useAnimatedGestureHandler<T extends GestureHandlerGestureEvent,
[],
);
return useEvent<(event: T['nativeEvent']) => void, OnGestureEvent<T>>(
return useEvent<any, TContext>(
handler, ['onGestureHandlerStateChange', 'onGestureHandlerEvent'], false,
);
}

View file

@ -3,7 +3,7 @@
import assert from 'assert';
import {act, renderHook} from '@testing-library/react-hooks';
import {act, renderHook} from '@testing-library/react-hooks'; // Use instead of react-native version due to different behavior. Consider migrating
import {createIntl} from 'react-intl';
import InCallManager from 'react-native-incall-manager';

View file

@ -6,7 +6,7 @@ import Permissions from 'react-native-permissions';
export const hasBluetoothPermission = async () => {
const bluetooth = Platform.select({
ios: Permissions.PERMISSIONS.IOS.BLUETOOTH_PERIPHERAL,
ios: Permissions.PERMISSIONS.IOS.BLUETOOTH,
default: Permissions.PERMISSIONS.ANDROID.BLUETOOTH_CONNECT,
});

View file

@ -3,7 +3,7 @@
import assert from 'assert';
import {act, renderHook} from '@testing-library/react-hooks';
import {act, renderHook} from '@testing-library/react-hooks'; // Use instead of react-native version due to different behavior. Consider migrating
import {needsRecordingAlert} from '@calls/alerts';
import {

View file

@ -18,7 +18,6 @@ import GalleryViewer from './viewer';
import type {ImageRendererProps} from './image_renderer';
import type {GalleryItemType} from '@typings/screens/gallery';
// @ts-expect-error FastImage does work with Animated.createAnimatedComponent
const AnimatedImage = Animated.createAnimatedComponent(FastImage);
interface GalleryProps {

View file

@ -54,7 +54,6 @@ export interface LightboxSwipeoutRef {
closeLightbox: () => void;
}
// @ts-expect-error FastImage does animate
const AnimatedImage = Animated.createAnimatedComponent(FastImage);
const timingConfig: WithTimingConfig = {

View file

@ -1,8 +1,8 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {act} from '@testing-library/react-native';
import React from 'react';
import {act} from 'react-test-renderer';
import {SYSTEM_IDENTIFIERS} from '@constants/database';
import {getTeamById} from '@queries/servers/team';

View file

@ -85,9 +85,9 @@ const SearchScreen = ({teamId, teams}: Props) => {
const insets = useSafeAreaInsets();
const keyboardHeight = useKeyboardHeight();
const stateIndex = nav.getState().index;
const stateIndex = nav.getState()?.index;
const serverUrl = useServerUrl();
const searchTerm = (nav.getState().routes[stateIndex].params as any)?.searchTerm;
const searchTerm: string = stateIndex === undefined ? '' : (nav.getState()?.routes[stateIndex]?.params as any)?.searchTerm || '';
const clearRef = useRef<boolean>(false);
const cancelRef = useRef<boolean>(false);
@ -276,7 +276,7 @@ const SearchScreen = ({teamId, teams}: Props) => {
return {
opacity: withTiming(0, {duration: 150}),
flex: 1,
transform: [{translateX: withTiming(stateIndex < searchScreenIndex ? 25 : -25, {duration: 150})}],
transform: [{translateX: withTiming((stateIndex || 0) < searchScreenIndex ? 25 : -25, {duration: 150})}],
};
}, [isFocused, stateIndex]);

View file

@ -5,7 +5,7 @@ import CookieManager, {type Cookies} from '@react-native-cookies/cookies';
import React, {useEffect} from 'react';
import {useIntl} from 'react-intl';
import {Alert, Platform, Text, View} from 'react-native';
import {WebView} from 'react-native-webview';
import {WebView, WebViewMessageEvent, WebViewNavigation} from 'react-native-webview';
import urlParse from 'url-parse';
import Loading from '@components/loading';
@ -13,13 +13,6 @@ import {Sso} from '@constants';
import {popTopScreen} from '@screens/navigation';
import {changeOpacity, makeStyleSheetFromTheme} from '@utils/theme';
import type {
WebViewErrorEvent,
WebViewMessageEvent,
WebViewNavigation,
WebViewNavigationEvent,
} from 'react-native-webview/lib/WebViewTypes';
interface SSOWithWebViewProps {
completeUrlPath: string;
doSSOLogin: (bearerToken: string, csrfToken: string) => void;
@ -207,7 +200,7 @@ const SSOWithWebView = ({completeUrlPath, doSSOLogin, loginError, loginUrl, serv
setMessagingEnabled(isMessagingEnabled);
};
const onLoadEnd = (event: WebViewNavigationEvent | WebViewErrorEvent) => {
const onLoadEnd = (event: {nativeEvent: {url: string}}) => {
const url = event.nativeEvent.url;
const parsed = urlParse(url);

View file

@ -12,7 +12,6 @@ import ProfilePicture from '@components/profile_picture';
import type UserModel from '@typings/database/models/servers/user';
// @ts-expect-error FastImage does work with Animated.createAnimatedComponent
const AnimatedFastImage = Animated.createAnimatedComponent(FastImage);
type Props = {

View file

@ -337,7 +337,7 @@ export const buttonBackgroundStyle = (
},
});
return StyleSheet.create([styles.main, sizes[size], backgroundStyles[emphasis][type][state]]);
return [styles.main, sizes[size], backgroundStyles[emphasis][type][state]];
};
/**
@ -414,6 +414,5 @@ export const buttonTextStyle = (
},
});
return StyleSheet.create([styles.main, sizes[size], {color}]);
return [styles.main, sizes[size], {color}];
};

View file

@ -1,8 +1,7 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {Alert, NativeModules, Platform, StatusBar} from 'react-native';
import AndroidOpenSettings from 'react-native-android-open-settings';
import {Alert, Linking, NativeModules, Platform, StatusBar} from 'react-native';
import DeviceInfo from 'react-native-device-info';
import DocumentPicker, {type DocumentPickerResponse} from 'react-native-document-picker';
import {type Asset, type CameraOptions, type ImageLibraryOptions, type ImagePickerResponse, launchCamera, launchImageLibrary} from 'react-native-image-picker';
@ -211,7 +210,7 @@ export default class FilePickerUtil {
id: 'mobile.permission_denied_retry',
defaultMessage: 'Settings',
}),
onPress: () => AndroidOpenSettings.appDetailsSettings(),
onPress: () => Linking.openSettings(),
},
]);
return false;
@ -247,7 +246,7 @@ export default class FilePickerUtil {
id: 'mobile.permission_denied_retry',
defaultMessage: 'Settings',
}),
onPress: () => AndroidOpenSettings.appDetailsSettings(),
onPress: () => Linking.openSettings(),
},
]);
return false;

View file

@ -3,8 +3,7 @@
import Model from '@nozbe/watermelondb/Model';
import mimeDB from 'mime-db';
import {Alert, Platform} from 'react-native';
import AndroidOpenSettings from 'react-native-android-open-settings';
import {Alert, Linking, Platform} from 'react-native';
import DeviceInfo from 'react-native-device-info';
import FileSystem from 'react-native-fs';
import Permissions, {PERMISSIONS} from 'react-native-permissions';
@ -516,7 +515,7 @@ export const hasWriteStoragePermission = async (intl: IntlShape) => {
id: 'mobile.permission_denied_retry',
defaultMessage: 'Settings',
}),
onPress: () => AndroidOpenSettings.appDetailsSettings(),
onPress: () => Linking.openSettings(),
},
]);
return false;

View file

@ -2,9 +2,9 @@
// See LICENSE.txt for license information.
module.exports = {
presets: [
'module:metro-react-native-babel-preset',
'@babel/preset-typescript',
['@babel/preset-env', {targets: {node: 'current'}}],
'module:@react-native/babel-preset',
'@babel/preset-typescript',
],
plugins: [
'@babel/plugin-transform-runtime',

View file

@ -1420,6 +1420,7 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Mattermost/Pods-Mattermost-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack/CocoaLumberjackPrivacy.bundle",
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf",
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Entypo.ttf",
@ -1440,12 +1441,13 @@
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Octicons.ttf",
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf",
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/Sentry/Sentry.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Alamofire.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/CocoaLumberjackPrivacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AntDesign.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Entypo.ttf",
@ -1466,7 +1468,7 @@
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Octicons.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SimpleLineIcons.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Zocial.ttf",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SDWebImage.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Sentry.bundle",
);
@ -1955,7 +1957,7 @@
"$(SRCROOT)/UploadAttachments/UploadAttachments",
);
INFOPLIST_FILE = Mattermost/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -1999,7 +2001,7 @@
"$(SRCROOT)/UploadAttachments/UploadAttachments",
);
INFOPLIST_FILE = Mattermost/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -2026,7 +2028,7 @@
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_COMMA = YES;
@ -2046,7 +2048,7 @@
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = NotificationService/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -2073,7 +2075,7 @@
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_COMMA = YES;
@ -2094,7 +2096,7 @@
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = NotificationService/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -2117,7 +2119,7 @@
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_COMMA = YES;
@ -2165,7 +2167,7 @@
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_COMMA = YES;
@ -2212,7 +2214,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
@ -2248,7 +2250,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "$(inherited)";
@ -2257,14 +2259,9 @@
"-DFOLLY_NO_CONFIG",
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
"-DFOLLY_CFG_NO_COROUTINES=1",
);
OTHER_LDFLAGS = (
"$(inherited)",
"-Wl",
"-ld_classic",
"-Wl",
"-ld_classic",
);
OTHER_LDFLAGS = "$(inherited)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
@ -2275,7 +2272,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
@ -2308,7 +2305,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = "";
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = (
@ -2316,14 +2313,9 @@
"-DFOLLY_NO_CONFIG",
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
"-DFOLLY_CFG_NO_COROUTINES=1",
);
OTHER_LDFLAGS = (
"$(inherited)",
"-Wl",
"-ld_classic",
"-Wl",
"-ld_classic",
);
OTHER_LDFLAGS = "$(inherited)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;

View file

@ -225,6 +225,11 @@ RNHWKeyboardEvent *hwKeyEvent = nil;
}
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
return [self getBundleURL];
}
- (NSURL *)getBundleURL
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];

View file

@ -41,14 +41,8 @@ target 'Mattermost' do
config = use_native_modules!
# Flags change depending on the env values.
# flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
# Hermes is now enabled by default. Disable by setting this flag to false.
:hermes_enabled => true,
:fabric_enabled => false,
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
@ -79,7 +73,6 @@ target 'Mattermost' do
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.4'
end
end
__apply_Xcode_12_5_M1_post_install_workaround(installer)
puts 'Patching Alamofire to include X-Uncompressed-Content-Length to measure download progress'
%x(patch Pods/Alamofire/Source/SessionDelegate.swift < patches/SessionDelegate.patch)

File diff suppressed because it is too large Load diff

5913
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -11,33 +11,31 @@
"npm": "^9.0.0"
},
"dependencies": {
"@formatjs/intl-datetimeformat": "6.12.0",
"@formatjs/intl-datetimeformat": "6.12.3",
"@formatjs/intl-getcanonicallocales": "2.3.0",
"@formatjs/intl-listformat": "7.5.3",
"@formatjs/intl-locale": "3.4.3",
"@formatjs/intl-numberformat": "8.9.0",
"@formatjs/intl-pluralrules": "5.2.10",
"@formatjs/intl-relativetimeformat": "11.2.10",
"@gorhom/bottom-sheet": "4.5.1",
"@formatjs/intl-listformat": "7.5.5",
"@formatjs/intl-locale": "3.4.5",
"@formatjs/intl-numberformat": "8.10.1",
"@formatjs/intl-pluralrules": "5.2.12",
"@gorhom/bottom-sheet": "4.6.1",
"@mattermost/calls": "github:mattermost/calls-common#954d125d14fd3b46d723bab01d92a0ef3ecca1b8",
"@mattermost/compass-icons": "0.1.43",
"@mattermost/react-native-emm": "1.4.0",
"@mattermost/react-native-network-client": "1.5.0",
"@mattermost/react-native-paste-input": "0.7.0",
"@mattermost/react-native-turbo-log": "0.3.1",
"@mattermost/react-native-emm": "1.4.1",
"@mattermost/react-native-network-client": "1.5.1",
"@mattermost/react-native-paste-input": "0.7.1",
"@mattermost/react-native-turbo-log": "0.3.2",
"@msgpack/msgpack": "2.8.0",
"@nozbe/watermelondb": "0.27.1",
"@react-native-camera-roll/camera-roll": "7.0.0",
"@react-native-clipboard/clipboard": "1.12.1",
"@react-native-community/datetimepicker": "7.6.1",
"@react-native-community/netinfo": "11.1.0",
"@react-native-camera-roll/camera-roll": "7.5.2",
"@react-native-clipboard/clipboard": "1.13.2",
"@react-native-community/datetimepicker": "7.6.4",
"@react-native-community/netinfo": "11.3.1",
"@react-native-cookies/cookies": "6.2.1",
"@react-navigation/bottom-tabs": "6.5.11",
"@react-navigation/native": "6.1.9",
"@react-navigation/stack": "6.3.20",
"@react-navigation/bottom-tabs": "6.5.20",
"@react-navigation/native": "6.1.17",
"@react-navigation/stack": "6.3.29",
"@sentry/react-native": "5.20.0",
"@stream-io/flat-list-mvcp": "0.10.3",
"@tsconfig/react-native": "3.0.2",
"@voximplant/react-native-foreground-service": "3.0.2",
"base-64": "1.0.0",
"commonmark": "npm:@mattermost/commonmark@0.30.1-2",
@ -46,137 +44,126 @@
"deepmerge": "4.3.1",
"emoji-regex": "10.3.0",
"fuse.js": "7.0.0",
"html-entities": "2.4.0",
"html-entities": "2.5.2",
"jail-monkey": "2.8.0",
"mime-db": "1.52.0",
"moment-timezone": "0.5.43",
"moment-timezone": "0.5.45",
"pako": "2.1.0",
"path-to-regexp": "6.2.1",
"path-to-regexp": "6.2.2",
"react": "18.2.0",
"react-freeze": "1.0.3",
"react-intl": "6.5.5",
"react-native": "0.72.7",
"react-native-android-open-settings": "1.3.0",
"react-freeze": "1.0.4",
"react-intl": "6.6.5",
"react-native": "0.73.6",
"react-native-background-timer": "2.4.1",
"react-native-button": "3.1.0",
"react-native-calendars": "1.1302.0",
"react-native-calendars": "1.1304.1",
"react-native-create-thumbnail": "1.6.4",
"react-native-device-info": "10.11.0",
"react-native-document-picker": "9.0.1",
"react-native-dotenv": "3.4.9",
"react-native-device-info": "10.13.1",
"react-native-document-picker": "9.1.1",
"react-native-dotenv": "3.4.11",
"react-native-elements": "3.4.3",
"react-native-exception-handler": "2.10.10",
"react-native-fast-image": "8.6.3",
"react-native-file-viewer": "2.1.5",
"react-native-fs": "2.20.0",
"react-native-gesture-handler": "2.13.4",
"react-native-gesture-handler": "2.16.0",
"react-native-haptic-feedback": "2.2.0",
"react-native-hw-keyboard-event": "0.0.4",
"react-native-image-picker": "7.0.3",
"react-native-image-picker": "7.1.2",
"react-native-in-app-review": "4.3.3",
"react-native-incall-manager": "4.1.0",
"react-native-incall-manager": "4.2.0",
"react-native-keyboard-aware-scroll-view": "0.9.5",
"react-native-keyboard-tracking-view": "5.7.0",
"react-native-keychain": "8.1.2",
"react-native-keychain": "8.2.0",
"react-native-linear-gradient": "2.8.3",
"react-native-localize": "3.0.3",
"react-native-localize": "3.1.0",
"react-native-math-view": "3.9.5",
"react-native-navigation": "7.37.1-hotfix.1",
"react-native-navigation": "7.39.1",
"react-native-notifications": "5.1.0",
"react-native-permissions": "3.10.1",
"react-native-reanimated": "3.5.4",
"react-native-safe-area-context": "4.7.4",
"react-native-screens": "3.27.0",
"react-native-permissions": "4.1.5",
"react-native-reanimated": "3.8.1",
"react-native-safe-area-context": "4.9.0",
"react-native-screens": "3.30.1",
"react-native-section-list-get-item-layout": "2.2.3",
"react-native-shadow-2": "7.0.8",
"react-native-share": "10.0.1",
"react-native-svg": "14.0.0",
"react-native-vector-icons": "10.0.2",
"react-native-share": "10.1.0",
"react-native-svg": "15.1.0",
"react-native-vector-icons": "10.0.3",
"react-native-video": "5.2.1",
"react-native-walkthrough-tooltip": "1.5.0",
"react-native-webrtc": "111.0.6",
"react-native-webview": "13.6.3",
"react-native-walkthrough-tooltip": "1.6.0",
"react-native-webrtc": "118.0.3",
"react-native-webview": "13.8.4",
"react-syntax-highlighter": "15.5.0",
"readable-stream": "4.4.2",
"semver": "7.5.4",
"serialize-error": "11.0.3",
"shallow-equals": "1.0.0",
"semver": "7.6.0",
"tinycolor2": "1.6.0",
"url-parse": "1.5.10"
},
"devDependencies": {
"@babel/cli": "7.23.4",
"@babel/core": "7.23.",
"@babel/eslint-parser": "7.23.3",
"@babel/cli": "7.24.1",
"@babel/core": "7.24.4",
"@babel/eslint-parser": "7.24.1",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-proposal-decorators": "7.23.3",
"@babel/plugin-transform-flow-strip-types": "7.23.3",
"@babel/plugin-transform-runtime": "7.23.4",
"@babel/preset-env": "7.23.3",
"@babel/preset-typescript": "7.23.3",
"@babel/register": "7.22.15",
"@babel/runtime": "7.23.4",
"@react-native/eslint-config": "0.74.0",
"@react-native/metro-config": "0.73.2",
"@babel/plugin-proposal-decorators": "7.24.1",
"@babel/plugin-transform-flow-strip-types": "7.24.1",
"@babel/plugin-transform-runtime": "7.24.3",
"@babel/preset-env": "7.24.4",
"@babel/preset-typescript": "7.24.1",
"@babel/register": "7.23.7",
"@babel/runtime": "7.24.4",
"@react-native/babel-preset": "0.73.21",
"@react-native/eslint-config": "0.73.2",
"@react-native/metro-config": "0.73.5",
"@react-native/typescript-config": "0.73.1",
"@testing-library/react-hooks": "8.0.1",
"@testing-library/react-native": "12.4.0",
"@testing-library/react-native": "12.4.5",
"@types/base-64": "1.0.2",
"@types/commonmark": "0.27.9",
"@types/commonmark-react-renderer": "4.3.4",
"@types/deep-equal": "1.0.4",
"@types/jest": "29.5.10",
"@types/lodash": "4.14.202",
"@types/jest": "29.5.12",
"@types/lodash": "4.17.0",
"@types/mime-db": "1.43.5",
"@types/pako": "2.0.3",
"@types/querystringify": "2.0.2",
"@types/react": "18.2.38",
"@types/react": "18.2.77",
"@types/react-native-background-timer": "2.0.2",
"@types/react-native-button": "3.0.4",
"@types/react-native-button": "3.0.5",
"@types/react-native-dotenv": "0.2.2",
"@types/react-native-share": "3.3.6",
"@types/react-native-video": "5.0.18",
"@types/react-syntax-highlighter": "15.5.10",
"@types/react-test-renderer": "18.0.7",
"@types/readable-stream": "4.0.9",
"@types/semver": "7.5.6",
"@types/shallow-equals": "1.0.3",
"@types/react-native-share": "3.3.8",
"@types/react-native-video": "5.0.20",
"@types/react-syntax-highlighter": "15.5.11",
"@types/semver": "7.5.8",
"@types/tinycolor2": "1.4.6",
"@types/tough-cookie": "4.0.5",
"@types/url-parse": "1.4.11",
"@types/uuid": "9.0.7",
"@typescript-eslint/eslint-plugin": "6.12.0",
"@typescript-eslint/parser": "6.12.0",
"axios": "1.6.2",
"axios-cookiejar-support": "4.0.7",
"@types/uuid": "9.0.8",
"@typescript-eslint/eslint-plugin": "6.21.0",
"@typescript-eslint/parser": "6.21.0",
"axios": "1.6.8",
"axios-cookiejar-support": "5.0.1",
"babel-jest": "29.7.0",
"babel-loader": "9.1.3",
"babel-plugin-module-resolver": "5.0.0",
"deep-freeze": "0.0.1",
"detox": "20.13.5",
"eslint": "8.54.0",
"detox": "20.20.1",
"eslint": "8.57.0",
"eslint-plugin-header": "3.1.1",
"eslint-plugin-import": "2.29.0",
"eslint-plugin-jest": "27.6.0",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-jest": "28.2.0",
"eslint-plugin-react": "7.34.1",
"eslint-plugin-react-hooks": "4.6.0",
"husky": "8.0.3",
"husky": "9.0.11",
"isomorphic-fetch": "3.0.0",
"jest": "29.7.0",
"jest-cli": "29.7.0",
"jetifier": "2.0.0",
"metro-react-native-babel-preset": "0.77.0",
"mmjstool": "github:mattermost/mattermost-utilities#83b1b311972b8f5e750aae4019457a40abb5aa44",
"mock-async-storage": "2.2.0",
"nock": "13.3.8",
"nock": "13.5.4",
"patch-package": "8.0.0",
"react-devtools-core": "4.28.5",
"react-native-svg-transformer": "1.1.0",
"react-test-renderer": "18.2.0",
"react-devtools-core": "5.0.2",
"react-native-svg-transformer": "1.3.0",
"tough-cookie": "4.1.3",
"ts-jest": "29.1.1",
"typescript": "5.3.2",
"underscore": "1.13.6",
"util": "0.12.5",
"ts-jest": "29.1.2",
"typescript": "5.3.3",
"uuid": "9.0.1"
},
"scripts": {
@ -202,7 +189,7 @@
"pod-install": "cd ios && pod install",
"pod-install-m1": "cd ios && arch -x86_64 pod install",
"postinstall": "patch-package && ./scripts/postinstall.sh",
"prepare": "husky install",
"prepare": "husky",
"preinstall": "./scripts/preinstall.sh && npx solidarity",
"start": "react-native start",
"test": "jest --forceExit --runInBand",
@ -216,21 +203,6 @@
"@types/react": "^18.2.37",
"react": "^18.2.0",
"react-test-renderer": "^18.2.0"
},
"react-native": {
"react": "^18.2.0"
},
"react-native-elements": {
"react-native-safe-area-context": "^4.7.4"
},
"react-native-fast-image": {
"react": "^18.2.0"
},
"react-native-walkthrough-tooltip": {
"@types/react": "^18.2.18"
},
"@react-native-community/cli": {
"semver": "^6.3.1"
}
}
}

View file

@ -20,10 +20,10 @@ index 252d1e7..09328c5 100644
if (network != null) {
diff --git a/node_modules/@react-native-community/netinfo/src/internal/internetReachability.ts b/node_modules/@react-native-community/netinfo/src/internal/internetReachability.ts
index 2cd4dee..18ac566 100644
index 757d784..663abda 100644
--- a/node_modules/@react-native-community/netinfo/src/internal/internetReachability.ts
+++ b/node_modules/@react-native-community/netinfo/src/internal/internetReachability.ts
@@ -116,20 +116,20 @@ export default class InternetReachability {
@@ -109,10 +109,10 @@ export default class InternetReachability {
const nextTimeoutInterval = this._isInternetReachable
? this._configuration.reachabilityLongTimeout
: this._configuration.reachabilityShortTimeout;
@ -38,8 +38,9 @@ index 2cd4dee..18ac566 100644
},
)
.catch(
(error: Error | 'timedout' | 'canceled'): void => {
if (error !== 'canceled') {
@@ -125,10 +125,10 @@ export default class InternetReachability {
}
this._setIsInternetReachable(false);
- this._currentTimeoutHandle = setTimeout(
- this._checkInternetReachability,

View file

@ -1,5 +1,5 @@
diff --git a/node_modules/@types/react-syntax-highlighter/index.d.ts b/node_modules/@types/react-syntax-highlighter/index.d.ts
index b75a0bf..f5e7179 100644
index 1893c37..d527a23 100644
--- a/node_modules/@types/react-syntax-highlighter/index.d.ts
+++ b/node_modules/@types/react-syntax-highlighter/index.d.ts
@@ -55,6 +55,10 @@ declare module "react-syntax-highlighter" {

View file

@ -8,8 +8,8 @@ index db0fada..8469b1a 100644
s.dependency 'React-Core'
- s.dependency 'SDWebImage', '~> 5.11.1'
- s.dependency 'SDWebImageWebPCoder', '~> 0.8.4'
+ s.dependency 'SDWebImage', '~> 5.18.2'
+ s.dependency 'SDWebImageWebPCoder', '~> 0.13.0'
+ s.dependency 'SDWebImage', '~> 5.19.0'
+ s.dependency 'SDWebImageWebPCoder', '~> 0.14.5'
end
diff --git a/node_modules/react-native-fast-image/android/src/main/java/com/dylanvann/fastimage/FastImageCookieJar.java b/node_modules/react-native-fast-image/android/src/main/java/com/dylanvann/fastimage/FastImageCookieJar.java
new file mode 100644

View file

@ -11,10 +11,10 @@ index 4a1234f..f3e2308 100644
+-(NSArray<NSString*>*)getAllServersForInternetPasswords;
@end
diff --git a/node_modules/react-native-keychain/RNKeychainManager/RNKeychainManager.m b/node_modules/react-native-keychain/RNKeychainManager/RNKeychainManager.m
index 1e7021c..6990ae4 100644
index 58d555f..d8c4069 100644
--- a/node_modules/react-native-keychain/RNKeychainManager/RNKeychainManager.m
+++ b/node_modules/react-native-keychain/RNKeychainManager/RNKeychainManager.m
@@ -271,6 +271,36 @@ SecAccessControlCreateFlags accessControlValue(NSDictionary *options)
@@ -275,6 +275,36 @@ SecAccessControlCreateFlags accessControlValue(NSDictionary *options)
return SecItemDelete((__bridge CFDictionaryRef) query);
}
@ -51,7 +51,7 @@ index 1e7021c..6990ae4 100644
-(NSArray<NSString*>*)getAllServicesForSecurityClasses:(NSArray *)secItemClasses
{
NSMutableDictionary *query = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@@ -598,4 +628,14 @@ RCT_EXPORT_METHOD(getAllGenericPasswordServices:(RCTPromiseResolveBlock)resolve
@@ -607,4 +637,14 @@ RCT_EXPORT_METHOD(getAllGenericPasswordServices:(RCTPromiseResolveBlock)resolve
}
}
@ -67,7 +67,7 @@ index 1e7021c..6990ae4 100644
+
@end
diff --git a/node_modules/react-native-keychain/android/src/main/java/com/oblador/keychain/KeychainModule.java b/node_modules/react-native-keychain/android/src/main/java/com/oblador/keychain/KeychainModule.java
index 6ca68cb..dacb1ed 100644
index 9413000..422581a 100644
--- a/node_modules/react-native-keychain/android/src/main/java/com/oblador/keychain/KeychainModule.java
+++ b/node_modules/react-native-keychain/android/src/main/java/com/oblador/keychain/KeychainModule.java
@@ -1,6 +1,7 @@
@ -129,10 +129,10 @@ index 6ca68cb..dacb1ed 100644
promise.resolve(true);
} catch (KeyStoreAccessException e) {
diff --git a/node_modules/react-native-keychain/index.js b/node_modules/react-native-keychain/index.js
index 75c0d5c..e6c44d8 100644
index 083938e..c8728a0 100644
--- a/node_modules/react-native-keychain/index.js
+++ b/node_modules/react-native-keychain/index.js
@@ -352,6 +352,21 @@ export function canImplyAuthentication(options?: Options): Promise<boolean> {
@@ -351,6 +351,21 @@ export function canImplyAuthentication(options?: Options): Promise<boolean> {
return RNKeychainManager.canCheckAuthentication(options);
}
@ -155,7 +155,7 @@ index 75c0d5c..e6c44d8 100644
/**
diff --git a/node_modules/react-native-keychain/typings/react-native-keychain.d.ts b/node_modules/react-native-keychain/typings/react-native-keychain.d.ts
index af2eb56..038047b 100644
index 6846468..bc03596 100644
--- a/node_modules/react-native-keychain/typings/react-native-keychain.d.ts
+++ b/node_modules/react-native-keychain/typings/react-native-keychain.d.ts
@@ -97,6 +97,8 @@ declare module 'react-native-keychain' {

View file

@ -1,5 +1,5 @@
diff --git a/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/NavigationActivity.java b/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/NavigationActivity.java
index 8ddc3d5..609e359 100644
index 481aaf0..609e359 100644
--- a/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/NavigationActivity.java
+++ b/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/NavigationActivity.java
@@ -1,18 +1,15 @@
@ -73,16 +73,8 @@ index 8ddc3d5..609e359 100644
public void requestPermissions(String[] permissions, int requestCode, PermissionListener listener) {
mPermissionListener = listener;
requestPermissions(permissions, requestCode);
@@ -134,6 +130,7 @@ public class NavigationActivity extends AppCompatActivity implements DefaultHard
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
+ super.onRequestPermissionsResult(requestCode, permissions, grantResults);
NavigationApplication.instance.onRequestPermissionsResult(requestCode, permissions, grantResults);
if (mPermissionListener != null && mPermissionListener.onRequestPermissionsResult(requestCode, permissions, grantResults)) {
mPermissionListener = null;
diff --git a/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationModule.java b/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationModule.java
index 195973f..c5dbafe 100644
index 4cc09eb..2c46d59 100644
--- a/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationModule.java
+++ b/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationModule.java
@@ -66,15 +66,22 @@ public class NavigationModule extends ReactContextBaseJavaModule {
@ -208,7 +200,7 @@ index b44f24f..bf4e1c3 100644
[hitTestResult isKindOfClass:NSClassFromString(@"RCTRootComponentView")]) {
return nil;
diff --git a/node_modules/react-native-navigation/lib/src/interfaces/Options.ts b/node_modules/react-native-navigation/lib/src/interfaces/Options.ts
index 4851b40..e891183 100644
index 1ab5b4e..ccd0b74 100644
--- a/node_modules/react-native-navigation/lib/src/interfaces/Options.ts
+++ b/node_modules/react-native-navigation/lib/src/interfaces/Options.ts
@@ -1,5 +1,5 @@

View file

@ -1,94 +0,0 @@
diff --git a/node_modules/react-native-reanimated/lib/.DS_Store b/node_modules/react-native-reanimated/lib/.DS_Store
new file mode 100644
index 0000000..42f752f
Binary files /dev/null and b/node_modules/react-native-reanimated/lib/.DS_Store differ
diff --git a/node_modules/react-native-reanimated/lib/typescript/reanimated2/hook/utils.d.ts b/node_modules/react-native-reanimated/lib/typescript/reanimated2/hook/utils.d.ts
index 9f9fa21..c791dab 100644
--- a/node_modules/react-native-reanimated/lib/typescript/reanimated2/hook/utils.d.ts
+++ b/node_modules/react-native-reanimated/lib/typescript/reanimated2/hook/utils.d.ts
@@ -9,7 +9,11 @@ interface Handlers<T, TContext extends __Context> {
[key: string]: Handler<T, TContext> | undefined;
}
type useEventType = <T extends object>(handler: (e: T) => void, eventNames?: string[], rebuild?: boolean) => (e: NativeSyntheticEvent<T>) => void;
-export declare const useEvent: useEventType;
+export declare function useEvent<T, K>(
+ handler: T,
+ events: string[],
+ rebuild: boolean,
+): K;
type useHandlerType = <T, TContext extends __Context = Record<string, never>>(handlers: Handlers<T, TContext>, deps?: DependencyList) => {
context: TContext;
doDependenciesDiffer: boolean;
diff --git a/node_modules/react-native-reanimated/lib/typescript/reanimated2/index.d.ts b/node_modules/react-native-reanimated/lib/typescript/reanimated2/index.d.ts
index 3e024d1..129653b 100644
--- a/node_modules/react-native-reanimated/lib/typescript/reanimated2/index.d.ts
+++ b/node_modules/react-native-reanimated/lib/typescript/reanimated2/index.d.ts
@@ -1,6 +1,7 @@
import './publicGlobals';
export type { WorkletRuntime } from './core';
export { runOnJS, runOnUI, createWorkletRuntime, makeMutable, makeShareableCloneRecursive, isReanimated3, isConfigured, enableLayoutAnimations, getViewProp, } from './core';
+export {makeRemote} from './mutables';
export type { GestureHandlers, AnimatedRef, ScrollHandler, ScrollHandlers, DerivedValue, FrameCallback, } from './hook';
export { useAnimatedProps, useEvent, useHandler, useWorkletCallback, useSharedValue, useReducedMotion, useAnimatedStyle, useAnimatedGestureHandler, useAnimatedReaction, useAnimatedRef, useAnimatedScrollHandler, useDerivedValue, useAnimatedSensor, useFrameCallback, useAnimatedKeyboard, useScrollViewOffset, } from './hook';
export type { DelayAnimation, RepeatAnimation, SequenceAnimation, StyleLayoutAnimation, WithTimingConfig, TimingAnimation, WithSpringConfig, SpringAnimation, WithDecayConfig, DecayAnimation, } from './animation';
diff --git a/node_modules/react-native-reanimated/src/reanimated2/index.ts b/node_modules/react-native-reanimated/src/reanimated2/index.ts
index 9725e49..c1e63d5 100644
--- a/node_modules/react-native-reanimated/src/reanimated2/index.ts
+++ b/node_modules/react-native-reanimated/src/reanimated2/index.ts
@@ -12,6 +12,7 @@ export {
enableLayoutAnimations,
getViewProp,
} from './core';
+export {makeRemote} from './mutables';
export type {
GestureHandlers,
AnimatedRef,
diff --git a/node_modules/react-native-reanimated/src/reanimated2/mutables.ts b/node_modules/react-native-reanimated/src/reanimated2/mutables.ts
index 50d80e9..e598ae1 100644
--- a/node_modules/react-native-reanimated/src/reanimated2/mutables.ts
+++ b/node_modules/react-native-reanimated/src/reanimated2/mutables.ts
@@ -94,25 +94,25 @@ export function makeMutable<T>(
}
return value;
},
- set _value(newValue: T) {
- if (NativeReanimatedModule.native) {
- throw new Error(
- '[Reanimated] Setting `_value` directly is only possible on the UI runtime.'
- );
- }
- value = newValue;
- listeners!.forEach((listener) => {
- listener(newValue);
- });
- },
- get _value(): T {
- if (NativeReanimatedModule.native) {
- throw new Error(
- '[Reanimated] Reading from `_value` directly is only possible on the UI runtime.'
- );
- }
- return value;
- },
+ // set _value(newValue: T) {
+ // if (NativeReanimatedModule.native) {
+ // throw new Error(
+ // '[Reanimated] Setting `_value` directly is only possible on the UI runtime.'
+ // );
+ // }
+ // value = newValue;
+ // listeners!.forEach((listener) => {
+ // listener(newValue);
+ // });
+ // },
+ // get _value(): T {
+ // if (NativeReanimatedModule.native) {
+ // throw new Error(
+ // '[Reanimated] Reading from `_value` directly is only possible on the UI runtime.'
+ // );
+ // }
+ // return value;
+ // },
modify: (modifier: (value: T) => T) => {
runOnUI(() => {
mutable.value = modifier(mutable.value);

View file

@ -1,8 +1,8 @@
diff --git a/node_modules/react-native-safe-area-context/android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaView.kt b/node_modules/react-native-safe-area-context/android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaView.kt
index ca5646c..7bcc64d 100644
index b29e787..074cbcc 100644
--- a/node_modules/react-native-safe-area-context/android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaView.kt
+++ b/node_modules/react-native-safe-area-context/android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaView.kt
@@ -13,7 +13,7 @@ import java.util.*
@@ -11,7 +11,7 @@ import com.facebook.react.views.view.ReactViewGroup
import java.util.concurrent.locks.ReentrantLock
import kotlin.concurrent.withLock
@ -10,4 +10,4 @@ index ca5646c..7bcc64d 100644
+private const val MAX_WAIT_TIME_NANO = 5000000L // 5ms
class SafeAreaView(context: Context?) :
ReactViewGroup(context), ViewTreeObserver.OnPreDrawListener, HasFabricViewStateManager {
ReactViewGroup(context), ViewTreeObserver.OnPreDrawListener {

View file

@ -1,8 +1,8 @@
diff --git a/node_modules/react-native-svg/src/xml.tsx b/node_modules/react-native-svg/src/xml.tsx
index 385dd09..2b78d6e 100644
index 9e2352a..fb45382 100644
--- a/node_modules/react-native-svg/src/xml.tsx
+++ b/node_modules/react-native-svg/src/xml.tsx
@@ -137,9 +137,11 @@ export function SvgUri(props: UriProps) {
@@ -138,9 +138,11 @@ export function SvgUri(props: UriProps) {
uri
? fetchText(uri)
.then((data) => {

View file

@ -1,12 +0,0 @@
diff --git a/node_modules/react-native-svg-transformer/index.js b/node_modules/react-native-svg-transformer/index.js
index e07ebb6..3a2be69 100644
--- a/node_modules/react-native-svg-transformer/index.js
+++ b/node_modules/react-native-svg-transformer/index.js
@@ -1,6 +1,6 @@
const { resolveConfig, transform } = require("@svgr/core");
const resolveConfigDir = require("path-dirname");
-const upstreamTransformer = require("metro-react-native-babel-transformer");
+const upstreamTransformer = require("metro-babel-transformer");
const defaultSVGRConfig = {
native: true,

View file

@ -1,5 +1,5 @@
diff --git a/node_modules/react-native-video/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/node_modules/react-native-video/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java
index fe95fdf..1fd5d23 100644
index fe95fdf..c95448a 100644
--- a/node_modules/react-native-video/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java
+++ b/node_modules/react-native-video/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java
@@ -3,6 +3,7 @@ package com.brentvatne.exoplayer;
@ -26,6 +26,24 @@ index fe95fdf..1fd5d23 100644
// Invoking onClick event for exoplayerView
exoPlayerView.setOnClickListener(new OnClickListener() {
@@ -327,7 +330,7 @@ class ReactExoplayerView extends FrameLayout implements
});
//Handling the playButton click event
- ImageButton playButton = playerControlView.findViewById(R.id.exo_play);
+ ImageButton playButton = playerControlView.findViewById(com.google.android.exoplayer2.R.id.exo_play);
playButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -339,7 +342,7 @@ class ReactExoplayerView extends FrameLayout implements
});
//Handling the pauseButton click event
- ImageButton pauseButton = playerControlView.findViewById(R.id.exo_pause);
+ ImageButton pauseButton = playerControlView.findViewById(com.google.android.exoplayer2.R.id.exo_pause);
pauseButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -736,6 +739,7 @@ class ReactExoplayerView extends FrameLayout implements
@Override
public void onPlayerStateChanged(boolean playWhenReady, int playbackState) {
@ -47,13 +65,13 @@ index fe95fdf..1fd5d23 100644
eventEmitter.fullscreenWillPresent();
decorView.setSystemUiVisibility(uiOptions);
+ decorView.setBackgroundColor(Color.parseColor("#000000"));
+ fullscreenButton.setImageResource(R.drawable.exo_controls_fullscreen_exit);
+ fullscreenButton.setImageResource(com.google.android.exoplayer2.R.drawable.exo_controls_fullscreen_exit);
eventEmitter.fullscreenDidPresent();
} else {
uiOptions = View.SYSTEM_UI_FLAG_VISIBLE;
eventEmitter.fullscreenWillDismiss();
decorView.setSystemUiVisibility(uiOptions);
+ fullscreenButton.setImageResource(R.drawable.exo_controls_fullscreen_enter);
+ fullscreenButton.setImageResource(com.google.android.exoplayer2.R.drawable.exo_controls_fullscreen_enter);
eventEmitter.fullscreenDidDismiss();
}
}
@ -92,10 +110,10 @@ index becee6a..5d4b2cd 100644
</LinearLayout>
diff --git a/node_modules/react-native-video/ios/Video/RCTVideo.m b/node_modules/react-native-video/ios/Video/RCTVideo.m
index a757c08..2e402e2 100644
index a757c08..da428cd 100644
--- a/node_modules/react-native-video/ios/Video/RCTVideo.m
+++ b/node_modules/react-native-video/ios/Video/RCTVideo.m
@@ -449,6 +449,7 @@ - (void)playerItemPrepareText:(AVAsset *)asset assetOptions:(NSDictionary * __nu
@@ -449,6 +449,7 @@ static int const RCTVideoUnset = -1;
_allowsExternalPlayback = NO;
// sideload text tracks
@ -103,7 +121,7 @@ index a757c08..2e402e2 100644
AVMutableComposition *mixComposition = [[AVMutableComposition alloc] init];
AVAssetTrack *videoAsset = [asset tracksWithMediaType:AVMediaTypeVideo].firstObject;
@@ -466,30 +467,58 @@ - (void)playerItemPrepareText:(AVAsset *)asset assetOptions:(NSDictionary * __nu
@@ -466,30 +467,58 @@ static int const RCTVideoUnset = -1;
error:nil];
NSMutableArray* validTextTracks = [NSMutableArray array];

View file

@ -1,8 +1,8 @@
diff --git a/node_modules/react-native-walkthrough-tooltip/src/tooltip.js b/node_modules/react-native-walkthrough-tooltip/src/tooltip.js
index db612fd..0262d6d 100644
index 3098692..a966dfb 100644
--- a/node_modules/react-native-walkthrough-tooltip/src/tooltip.js
+++ b/node_modules/react-native-walkthrough-tooltip/src/tooltip.js
@@ -212,7 +212,7 @@ class Tooltip extends Component {
@@ -216,7 +216,7 @@ class Tooltip extends Component {
this.setState(
{
windowDims: dims.window,
@ -11,7 +11,7 @@ index db612fd..0262d6d 100644
adjustedContentSize: new Size(0, 0),
anchorPoint: new Point(0, 0),
tooltipOrigin: new Point(0, 0),
@@ -268,9 +268,9 @@ class Tooltip extends Component {
@@ -272,9 +272,9 @@ class Tooltip extends Component {
this.childWrapper.current &&
typeof this.childWrapper.current.measure === 'function'
) {