mirror of
https://github.com/siop-spelev/siop2.git
synced 2026-08-08 12:41:54 +00:00
fix(mobile): expo-file-system deleteAsync — import legacy subpath
SDK 57 deprecates the module-level functions (deleteAsync included) in favor of the File/Directory classes, and now throws at runtime in dev instead of just warning — surfaced as a red-box crash on the Assistant screen right after transcription (found in recette, 02/08). The dictée purge in cloture.tsx uses the exact same call and was silently affected too. Fix: import from 'expo-file-system/legacy' in both — same function signature, no behavior change, just the non-deprecated entry point. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
import * as FileSystem from 'expo-file-system';
|
// SDK 57 : les fonctions module-level (dont deleteAsync) sont dépréciées au
|
||||||
|
// profit des classes File/Directory et lèvent désormais en développement —
|
||||||
|
// import explicite du sous-chemin legacy, comportement inchangé sinon.
|
||||||
|
import * as FileSystem from 'expo-file-system/legacy';
|
||||||
import { router } from 'expo-router';
|
import { router } from 'expo-router';
|
||||||
import { useRef, useState } from 'react';
|
import { useRef, useState } from 'react';
|
||||||
import { Pressable, ScrollView, Text, TextInput, View } from 'react-native';
|
import { Pressable, ScrollView, Text, TextInput, View } from 'react-native';
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
import * as FileSystem from 'expo-file-system';
|
// SDK 57 : les fonctions module-level (dont deleteAsync) sont dépréciées au
|
||||||
|
// profit des classes File/Directory et lèvent désormais en développement —
|
||||||
|
// import explicite du sous-chemin legacy, comportement inchangé sinon.
|
||||||
|
import * as FileSystem from 'expo-file-system/legacy';
|
||||||
import { router, useLocalSearchParams } from 'expo-router';
|
import { router, useLocalSearchParams } from 'expo-router';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { Pressable, ScrollView, Text, TextInput, View } from 'react-native';
|
import { Pressable, ScrollView, Text, TextInput, View } from 'react-native';
|
||||||
|
|||||||
Reference in New Issue
Block a user