Browse Source

Disabled some expo unimodules

Arnaud Vergnet 2 years ago
parent
commit
4f49b48fc5

+ 10
- 4
android/app/build.gradle View File

@@ -83,9 +83,6 @@ project.ext.react = [
83 83
 apply from: '../../node_modules/react-native-unimodules/gradle.groovy'
84 84
 apply from: "../../node_modules/react-native/react.gradle"
85 85
 
86
-project.ext.vectoricons = [
87
-    iconFontNames: [ 'MaterialCommunityIcons.ttf'] // Name of the font files you want to copy
88
-]
89 86
 
90 87
 apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
91 88
 
@@ -196,7 +193,16 @@ android {
196 193
 dependencies {
197 194
     implementation fileTree(dir: "libs", include: ["*.jar"])
198 195
     implementation "com.facebook.react:react-native:+"  // From node_modules
199
-    addUnimodulesDependencies()
196
+    addUnimodulesDependencies([exclude: [
197
+    'expo-error-recovery',
198
+    'expo-image-loader',
199
+    'expo-keep-awake',
200
+    'expo-linear-gradient',
201
+    'expo-location',
202
+    'expo-web-browser',
203
+    'expo-sqlite',
204
+    'expo-image-loader',
205
+     ]])
200 206
 
201 207
     if (enableHermes) {
202 208
         def hermesPath = "../../node_modules/hermes-engine/android/";

+ 1
- 8
android/app/src/main/java/fr/amicaleinsat/application/generated/BasePackageList.java View File

@@ -10,16 +10,9 @@ public class BasePackageList {
10 10
         new expo.modules.barcodescanner.BarCodeScannerPackage(),
11 11
         new expo.modules.camera.CameraPackage(),
12 12
         new expo.modules.constants.ConstantsPackage(),
13
-        new expo.modules.errorrecovery.ErrorRecoveryPackage(),
14 13
         new expo.modules.filesystem.FileSystemPackage(),
15 14
         new expo.modules.font.FontLoaderPackage(),
16
-        new expo.modules.imageloader.ImageLoaderPackage(),
17
-        new expo.modules.keepawake.KeepAwakePackage(),
18
-        new expo.modules.lineargradient.LinearGradientPackage(),
19
-        new expo.modules.location.LocationPackage(),
20
-        new expo.modules.permissions.PermissionsPackage(),
21
-        new expo.modules.sqlite.SQLitePackage(),
22
-        new expo.modules.webbrowser.WebBrowserPackage()
15
+        new expo.modules.permissions.PermissionsPackage()
23 16
     );
24 17
   }
25 18
 }

+ 14
- 14
src/screens/Proxiwash/ProxiwashScreen.js View File

@@ -1,12 +1,12 @@
1 1
 // @flow
2 2
 
3 3
 import * as React from 'react';
4
-import {Alert, Platform, View} from 'react-native';
4
+import {Alert, View} from 'react-native';
5 5
 import i18n from "i18n-js";
6 6
 import WebSectionList from "../../components/Screens/WebSectionList";
7 7
 import * as Notifications from "../../utils/Notifications";
8 8
 import AsyncStorageManager from "../../managers/AsyncStorageManager";
9
-import * as Expo from "expo";
9
+// import * as Expo from "expo";
10 10
 import {Avatar, Banner, Button, Card, Text, withTheme} from 'react-native-paper';
11 11
 import ProxiwashListItem from "../../components/Lists/Proxiwash/ProxiwashListItem";
12 12
 import ProxiwashConstants from "../../constants/ProxiwashConstants";
@@ -92,18 +92,18 @@ class ProxiwashScreen extends React.Component<Props, State> {
92 92
                 this.setState({machinesWatched: fetchedList})
93 93
             });
94 94
             // Get updated watchlist after received notification
95
-            Expo.Notifications.addListener(() => {
96
-                Notifications.getMachineNotificationWatchlist((fetchedList) => {
97
-                    this.setState({machinesWatched: fetchedList})
98
-                });
99
-            });
100
-            if (Platform.OS === 'android') {
101
-                Expo.Notifications.createChannelAndroidAsync('reminders', {
102
-                    name: 'Reminders',
103
-                    priority: 'max',
104
-                    vibrate: [0, 250, 250, 250],
105
-                });
106
-            }
95
+            // Expo.Notifications.addListener(() => {
96
+            //     Notifications.getMachineNotificationWatchlist((fetchedList) => {
97
+            //         this.setState({machinesWatched: fetchedList})
98
+            //     });
99
+            // });
100
+            // if (Platform.OS === 'android') {
101
+            //     Expo.Notifications.createChannelAndroidAsync('reminders', {
102
+            //         name: 'Reminders',
103
+            //         priority: 'max',
104
+            //         vibrate: [0, 250, 250, 250],
105
+            //     });
106
+            // }
107 107
         }
108 108
     }
109 109
 

+ 10
- 10
src/utils/Notifications.js View File

@@ -1,7 +1,7 @@
1 1
 // @flow
2 2
 
3 3
 import {checkNotifications, requestNotifications, RESULTS} from 'react-native-permissions';
4
-import {Notifications} from 'expo';
4
+// import {Notifications} from 'expo';
5 5
 import AsyncStorageManager from "../managers/AsyncStorageManager";
6 6
 import LocaleManager from "../managers/LocaleManager";
7 7
 import passwords from "../../passwords";
@@ -40,15 +40,15 @@ export async function askPermissions() {
40 40
  * @return {Promise<void>}
41 41
  */
42 42
 export async function initExpoToken() {
43
-    let token = AsyncStorageManager.getInstance().preferences.expoToken.current;
44
-    if (token === '') {
45
-        askPermissions().then(() => {
46
-            Notifications.getExpoPushTokenAsync().then((token) => {
47
-                // Save token for instant use later on
48
-                AsyncStorageManager.getInstance().savePref(AsyncStorageManager.getInstance().preferences.expoToken.key, token);
49
-            });
50
-        });
51
-    }
43
+    // let token = AsyncStorageManager.getInstance().preferences.expoToken.current;
44
+    // if (token === '') {
45
+    //     askPermissions().then(() => {
46
+    //         Notifications.getExpoPushTokenAsync().then((token) => {
47
+    //             // Save token for instant use later on
48
+    //             AsyncStorageManager.getInstance().savePref(AsyncStorageManager.getInstance().preferences.expoToken.key, token);
49
+    //         });
50
+    //     });
51
+    // }
52 52
 }
53 53
 
54 54
 /**

Loading…
Cancel
Save