mattermost-mobile/patches/@react-native-community+netinfo+11.1.0.patch
Elias Nahum edef4ec4a3
Update libraries and dependencies (#7678)
* update js dependencies

* update react-native libraries

* update watermelonDB

* update RN to 0.72.7

* update fastlane

* fix remove_markdown/at_mention import

* update mattermost libraries

* update fastlane deps

* remove haptic-feedback patch

* update okhttp to 4.12.0 and patch netinfo to accurately identify VPN connections

* create ImaegStyles intersection type
2023-11-25 07:46:13 +08:00

54 lines
3.1 KiB
Diff

diff --git a/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetworkCallbackConnectivityReceiver.java b/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetworkCallbackConnectivityReceiver.java
index 252d1e7..09328c5 100644
--- a/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetworkCallbackConnectivityReceiver.java
+++ b/node_modules/@react-native-community/netinfo/android/src/main/java/com/reactnativecommunity/netinfo/NetworkCallbackConnectivityReceiver.java
@@ -91,14 +91,14 @@ public class NetworkCallbackConnectivityReceiver extends ConnectivityReceiver {
// Get the connection type
if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_BLUETOOTH)) {
connectionType = ConnectionType.BLUETOOTH;
+ } else if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_VPN)) {
+ connectionType = ConnectionType.VPN;
} else if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) {
connectionType = ConnectionType.CELLULAR;
} else if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_ETHERNET)) {
connectionType = ConnectionType.ETHERNET;
} else if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)) {
connectionType = ConnectionType.WIFI;
- } else if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_VPN)) {
- connectionType = ConnectionType.VPN;
}
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
--- 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 {
const nextTimeoutInterval = this._isInternetReachable
? this._configuration.reachabilityLongTimeout
: this._configuration.reachabilityShortTimeout;
- this._currentTimeoutHandle = setTimeout(
- this._checkInternetReachability,
- nextTimeoutInterval,
- );
+ // this._currentTimeoutHandle = setTimeout(
+ // this._checkInternetReachability,
+ // nextTimeoutInterval,
+ // );
},
)
.catch(
(error: Error | 'timedout' | 'canceled'): void => {
if (error !== 'canceled') {
this._setIsInternetReachable(false);
- this._currentTimeoutHandle = setTimeout(
- this._checkInternetReachability,
- this._configuration.reachabilityShortTimeout,
- );
+ // this._currentTimeoutHandle = setTimeout(
+ // this._checkInternetReachability,
+ // this._configuration.reachabilityShortTimeout,
+ // );
}
},
)