Skip to content

Commit

Permalink
fix: 🐛 Corrige les crashs depuis la migration du SDK Expo 48
Browse files Browse the repository at this point in the history
  • Loading branch information
benguedj committed Jun 13, 2023
1 parent 3ae323c commit 2c0e606
Show file tree
Hide file tree
Showing 6 changed files with 1,591 additions and 1,250 deletions.
6 changes: 3 additions & 3 deletions front/app.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/naming-convention */
const APP_VERSION = "1.1.86";
const APP_VERSION_NUM = 86;
const APP_VERSION = "1.1.87";
const APP_VERSION_NUM = 87;

export default {
expo: {
Expand Down Expand Up @@ -89,7 +89,7 @@ export default {
],
],
runtimeVersion: {
policy: "appVersion",
policy: "sdkVersion",
},
scheme: "millejours",
slug: "1000jours",
Expand Down
6 changes: 1 addition & 5 deletions front/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ module.exports = function (api) {
api.cache(true);
return {
presets: ["babel-preset-expo", "@babel/preset-typescript"],
plugins: [
"inline-dotenv",
"react-native-reanimated/plugin",
["@babel/plugin-proposal-private-methods", { loose: true }],
],
plugins: ["inline-dotenv", "react-native-reanimated/plugin"],
};
};
6 changes: 3 additions & 3 deletions front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"expo-location": "~15.1.1",
"expo-notifications": "~0.18.1",
"expo-speech": "~11.1.1",
"expo-splash-screen": "~0.18.1",
"expo-splash-screen": "~0.18.2",
"expo-status-bar": "~1.4.2",
"expo-store-review": "~6.2.1",
"expo-system-ui": "~2.2.1",
Expand All @@ -86,7 +86,7 @@
"postinstall-postinstall": "^2.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.71.6",
"react-native": "0.71.8",
"react-native-animatable": "^1.3.3",
"react-native-calendars": "^1.1268.0",
"react-native-confetti": "^0.1.0",
Expand All @@ -110,7 +110,7 @@
"react-native-web": "~0.18.7",
"react-native-webview": "11.26.0",
"reanimated-bottom-sheet": "^1.0.0-alpha.22",
"sentry-expo": "~6.1.0",
"sentry-expo": "~6.2.0",
"uuid": "^8.3.2"
},
"devDependencies": {
Expand Down
7 changes: 3 additions & 4 deletions front/src/utils/app/app.util.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { StorageKeysConstants } from "../../constants";
import { StorageUtils } from "..";
import { scheduleInAppReviewNotification } from "../notifications/inappreview/inAppReview.util";
import { cancelAllScheduledNotifications } from "../notifications/notification.util";
import {
Expand Down Expand Up @@ -35,9 +34,9 @@ export const hasNewFeaturesToShow = async (
): Promise<boolean> => {
if (currentVersion && news && news.length > 0) {
const versions =
((await StorageUtils.getObjectValue(
StorageKeysConstants.newFeaturesAlreadyPop
)) as string[] | null) ?? [];
((await getObjectValue(StorageKeysConstants.newFeaturesAlreadyPop)) as
| string[]
| null) ?? [];
return !versions.includes(currentVersion);
}
return false;
Expand Down
2 changes: 1 addition & 1 deletion front/src/utils/storage.util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const multiRemove = async (storageKeys: string[]): Promise<void> => {
}
};

export const log = async (): Promise<[string, string | null][] | null> => {
export const log = async () => {
let storage = null;
try {
storage = await AsyncStorage.multiGet(StorageKeysConstants.allStorageKeys);
Expand Down
Loading

0 comments on commit 2c0e606

Please sign in to comment.