git ssb

1+

Daan Patchwork / manyverse



Commit 4047779fb27f19d7fff7ddc314e506b5aa4aea76

dx: remove rn-bluetooth-status and rn-android-wifi

Andre Staltz committed on 1/4/2020, 2:37:13 PM
Parent: 3a3e0ac54766595cc6a9614997bbf324f7b2d366

Files changed

android/app/build.gradlechanged
android/app/src/main/java/se/manyver/MainApplication.javachanged
android/settings.gradlechanged
package-lock.jsonchanged
package.jsonchanged
react-native.config.jschanged
src/frontend/drivers/network.tschanged
android/app/build.gradleView
@@ -230,17 +230,15 @@
230230 implementation "ch.acra:acra-dialog:$acraVersion"
231231 implementation project(':nodejs-mobile-react-native')
232232 implementation project(':@react-native-community_async-storage')
233233 implementation project(':react-native-bluetooth-socket-bridge')
234- implementation project(':react-native-bluetooth-status')
235234 implementation project(':react-native-dialogs')
236235 implementation project(':react-native-vector-icons')
237236 implementation project(':react-native-os-staltz')
238237 implementation project(':react-native-randombytes')
239238 implementation project(':react-native-image-crop-picker')
240239 implementation project(':react-native-navigation')
241240 implementation project(':react-native-android-local-notification')
242- implementation project(':react-native-android-wifi')
243241 implementation project(':react-native-has-internet')
244242 implementation project(':react-native-flag-secure-android')
245243 implementation project(':react-native-orientation-locker')
246244 implementation project(':react-native-fs')
android/app/src/main/java/se/manyver/MainApplication.javaView
@@ -20,16 +20,14 @@
2020 import com.facebook.soloader.SoLoader;
2121 import com.reactnativenavigation.NavigationApplication;
2222 import com.reactnativenavigation.react.NavigationReactNativeHost;
2323 import com.reactnativenavigation.react.ReactGateway;
24-import com.solinor.bluetoothstatus.RNBluetoothManagerPackage;
2524 import com.scuttlebutt.bluetoothbridge.BluetoothSocketBridgeConfiguration;
2625 import com.scuttlebutt.bluetoothbridge.BluetoothSocketBridgePackage;
2726 import com.staltz.reactnativeandroidlocalnotification.NotificationPackage;
2827 import com.staltz.reactnativehasinternet.HasInternetPackage;
2928 import com.staltz.flagsecure.FlagSecurePackage;
3029 import com.reactnativecommunity.asyncstorage.AsyncStoragePackage;
31-import com.devstepbcn.wifi.AndroidWifiPackage;
3230 import com.reactnative.ivpusic.imagepicker.PickerPackage;
3331 import org.wonday.orientation.OrientationPackage;
3432 import com.rnfs.RNFSPackage;
3533 import org.devio.rn.splashscreen.SplashScreenReactPackage;
@@ -87,13 +85,11 @@
8785
8886 List<ReactPackage> packages = new ArrayList<>();
8987 packages.add(new BuildConfigPackage());
9088 packages.add(new AsyncStoragePackage());
91- packages.add(new RNBluetoothManagerPackage());
9289 packages.add(new BluetoothSocketBridgePackage(bluetoothConfig));
9390 packages.add(new PickerPackage());
9491 packages.add(new HasInternetPackage());
95- packages.add(new AndroidWifiPackage());
9692 packages.add(new RandomBytesPackage());
9793 packages.add(new RNNodeJsMobilePackage());
9894 packages.add(new ReactNativeDialogsPackage());
9995 packages.add(new VectorIconsPackage());
android/settings.gradleView
@@ -1,10 +1,8 @@
11 rootProject.name = 'Manyverse'
22 apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
33 include ':@react-native-community_async-storage'
44 project(':@react-native-community_async-storage').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/async-storage/android')
5-include ':react-native-bluetooth-status'
6-project(':react-native-bluetooth-status').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-bluetooth-status/android')
75 include ':react-native-bluetooth-socket-bridge'
86 project(':react-native-bluetooth-socket-bridge').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-bluetooth-socket-bridge/android')
97 include ':react-native-image-crop-picker'
108 project(':react-native-image-crop-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-crop-picker/android')
@@ -21,10 +19,8 @@
2119 include ':react-native-navigation'
2220 project(':react-native-navigation').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-navigation/lib/android/app/')
2321 include ':react-native-android-local-notification'
2422 project(':react-native-android-local-notification').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-android-local-notification/android')
25-include ':react-native-android-wifi'
26-project(':react-native-android-wifi').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-android-wifi/android')
2723 include ':react-native-has-internet'
2824 project(':react-native-has-internet').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-has-internet/android')
2925 include ':react-native-flag-secure-android'
3026 project(':react-native-flag-secure-android').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-flag-secure-android/android')
package-lock.jsonView
The diff is too large to show. Use a local git client to view these changes.
Old file size: 758395 bytes
New file size: 757454 bytes
package.jsonView
@@ -59,11 +59,9 @@
5959 "react-human-time": "^1.1.0",
6060 "react-markdown": "4.0.2",
6161 "react-native": "0.61.5",
6262 "react-native-android-local-notification": "3.0.0",
63- "react-native-android-wifi": "0.0.41",
6463 "react-native-bluetooth-socket-bridge": "1.2.0",
65- "react-native-bluetooth-status": "1.3.0",
6664 "react-native-dialogs": "1.1.0",
6765 "react-native-flag-secure-android": "1.0.2",
6866 "react-native-floating-action": "1.19.1",
6967 "react-native-fs": "~2.16.2",
react-native.config.jsView
@@ -16,12 +16,6 @@
1616 // On iOS, we are postponing the support for Bluetooth as a transport
1717 ios: null,
1818 },
1919 },
20- 'react-native-system-setting': {
21- platforms: {
22- // On Android, we use react-native-android-wifi, so we don't need this
23- android: null,
24- },
25- },
2620 },
2721 };
src/frontend/drivers/network.tsView
@@ -4,11 +4,9 @@
44 * License, v. 2.0. If a copy of the MPL was not distributed with this
55 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
66
77 import xs, {Stream, Listener} from 'xstream';
8-import {BluetoothStatus} from 'react-native-bluetooth-status';
98 import {Platform} from 'react-native';
10-const wifi = require('react-native-android-wifi');
119 const SystemSetting = require('react-native-system-setting').default;
1210 const hasInternet = require('react-native-has-internet');
1311
1412 export class NetworkSource {
@@ -23,9 +21,9 @@
2321 return;
2422 }
2523
2624 try {
27- listener.next(await BluetoothStatus.state());
25+ listener.next(await SystemSetting.isBluetoothEnabled());
2826 listener.complete();
2927 } catch (e) {
3028 listener.error(e);
3129 }
@@ -35,20 +33,11 @@
3533 }
3634
3735 public wifiIsEnabled(): Stream<boolean> {
3836 return xs.create({
39- start(listener: Listener<boolean>) {
40- if (Platform.OS === 'android') {
41- wifi.isEnabled((isEnabled: boolean) => {
42- listener.next(isEnabled);
43- listener.complete();
44- });
45- } else {
46- SystemSetting.isWifiEnabled().then((isEnabled: boolean) => {
47- listener.next(isEnabled);
48- listener.complete();
49- });
50- }
37+ async start(listener: Listener<boolean>) {
38+ listener.next(await SystemSetting.isWifiEnabled());
39+ listener.complete();
5140 },
5241 stop() {},
5342 });
5443 }

Built with git-ssb-web