From fb4763e478e45c89fea427c2d7a32d76ab9f9b42 Mon Sep 17 00:00:00 2001 From: Gabry848 Date: Mon, 16 Mar 2026 17:55:41 +0100 Subject: [PATCH] fix(android): risolvi warning Play Store su edge-to-edge e orientamento - Rimuove android:screenOrientation="PORTRAIT" (cambia orientation da "portrait" a "default" in app.json) per supportare schermi grandi su Android 16+ - Aggiorna react-native-edge-to-edge da 1.6.0 a 1.8.1 per ridurre le API deprecate della libreria - Sostituisce SafeAreaView da react-native con react-native-safe-area-context in tutti i file (32 file) - Sostituisce StatusBar da react-native con expo-status-bar in tutti i file, rimuovendo la prop backgroundColor che invocava la deprecated setStatusBarColor API - Rimuove StatusBar.currentHeight sostituendolo con useSafeAreaInsets in ChatHeader e VoiceChatModal Co-Authored-By: Claude Sonnet 4.6 --- app.json | 2 +- package.json | 2 +- src/components/BotChat/ChatHeader.tsx | 16 +++++++++------- src/components/BotChat/VoiceCalendarModal.tsx | 4 ++-- src/components/BotChat/VoiceChatExample.tsx | 3 ++- src/components/BotChat/VoiceChatModal.tsx | 10 ++++++---- src/components/Calendar20/TopBar.tsx | 2 +- .../WelcomeCarousel/WelcomeCarouselScreen.tsx | 6 +++--- src/navigation/screens/About.tsx | 6 ++++-- src/navigation/screens/AccountSettings.tsx | 8 ++++---- src/navigation/screens/BotChat.tsx | 3 ++- src/navigation/screens/BugReport.tsx | 6 ++++-- src/navigation/screens/Calendar.tsx | 8 ++++---- src/navigation/screens/Calendar20.tsx | 6 ++++-- src/navigation/screens/Categories.tsx | 6 +++--- src/navigation/screens/ChangePassword.tsx | 6 ++++-- src/navigation/screens/EmailVerification.tsx | 6 +++--- src/navigation/screens/GoogleCalendar.tsx | 6 ++++-- src/navigation/screens/Help.tsx | 6 ++++-- src/navigation/screens/Home.tsx | 9 +++++---- src/navigation/screens/Language.tsx | 6 +++--- src/navigation/screens/Login.tsx | 6 +++--- src/navigation/screens/MemorySettings.tsx | 8 ++++---- src/navigation/screens/Notes.tsx | 2 +- src/navigation/screens/NotificationDebug.tsx | 6 +++--- src/navigation/screens/NotificationSettings.tsx | 8 ++++---- src/navigation/screens/Profile.tsx | 6 +++--- src/navigation/screens/Register.tsx | 6 +++--- src/navigation/screens/Settings.tsx | 6 ++++-- src/navigation/screens/Statistics.tsx | 8 ++++---- src/navigation/screens/VerificationSuccess.tsx | 6 +++--- src/navigation/screens/VoiceSettings.tsx | 8 ++++---- 32 files changed, 109 insertions(+), 88 deletions(-) diff --git a/app.json b/app.json index 865c5d9..4515021 100644 --- a/app.json +++ b/app.json @@ -3,7 +3,7 @@ "name": "My taskly", "slug": "mytaskly", "version": "1.0.0", - "orientation": "portrait", + "orientation": "default", "icon": "./assets/icons/ios-light.png", "userInterfaceStyle": "automatic", "newArchEnabled": false, diff --git a/package.json b/package.json index 26d5ce5..07e8d02 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "react-native-chat-ui": "^0.1.9", "react-native-copilot": "^3.3.3", "react-native-dotenv": "^3.4.11", - "react-native-edge-to-edge": "1.6.0", + "react-native-edge-to-edge": "1.8.1", "react-native-gesture-handler": "~2.24.0", "react-native-keyboard-aware-scrollview": "^2.1.0", "react-native-markdown-display": "^7.0.2", diff --git a/src/components/BotChat/ChatHeader.tsx b/src/components/BotChat/ChatHeader.tsx index f07e1a9..3169022 100644 --- a/src/components/BotChat/ChatHeader.tsx +++ b/src/components/BotChat/ChatHeader.tsx @@ -1,16 +1,18 @@ import React from 'react'; -import { StyleSheet, View, Text, TouchableOpacity, StatusBar } from 'react-native'; +import { StyleSheet, View, Text, TouchableOpacity } from 'react-native'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { MaterialIcons } from '@expo/vector-icons'; import { ChatHeaderProps } from './types'; -const ChatHeader: React.FC = ({ - modelType, - onModelChange, +const ChatHeader: React.FC = ({ + modelType, + onModelChange, onNewChat, - style + style }) => { + const insets = useSafeAreaInsets(); return ( - + = ({ visible, onClos statusBarTranslucent onRequestClose={handleClose} > - + {/* Overlay sfondo scuro */} diff --git a/src/components/BotChat/VoiceChatExample.tsx b/src/components/BotChat/VoiceChatExample.tsx index 5d2faba..28e2c9c 100644 --- a/src/components/BotChat/VoiceChatExample.tsx +++ b/src/components/BotChat/VoiceChatExample.tsx @@ -1,5 +1,6 @@ import React, { useState } from 'react'; -import { View, Text, StyleSheet, TouchableOpacity, SafeAreaView } from 'react-native'; +import { View, Text, StyleSheet, TouchableOpacity } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; import { MaterialIcons } from '@expo/vector-icons'; import VoiceChatModal from './VoiceChatModal'; import VoiceCalendarModal from './VoiceCalendarModal'; diff --git a/src/components/BotChat/VoiceChatModal.tsx b/src/components/BotChat/VoiceChatModal.tsx index 917514f..d18ea81 100644 --- a/src/components/BotChat/VoiceChatModal.tsx +++ b/src/components/BotChat/VoiceChatModal.tsx @@ -7,11 +7,12 @@ import { TouchableOpacity, Animated, Dimensions, - StatusBar, Alert, Platform, ScrollView, } from "react-native"; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; +import { StatusBar } from 'expo-status-bar'; import Svg, { Path, Defs, RadialGradient, Stop } from "react-native-svg"; import { Ionicons } from "@expo/vector-icons"; import { useVoiceChat, ActiveTool } from '../../hooks/useVoiceChat'; @@ -224,6 +225,7 @@ const VoiceChatModal: React.FC = ({ onClose, onOpenCalendar, }) => { + const insets = useSafeAreaInsets(); const { state, error, @@ -383,7 +385,7 @@ const VoiceChatModal: React.FC = ({ statusBarTranslucent={true} onRequestClose={handleClose} > - + = ({ ]} > {/* Header */} - + {isConnected ? ( @@ -542,7 +544,7 @@ const styles = StyleSheet.create({ // Header header: { - paddingTop: StatusBar.currentHeight ? StatusBar.currentHeight + 16 : 52, + paddingTop: 52, paddingHorizontal: 20, paddingBottom: 14, flexDirection: "row", diff --git a/src/components/Calendar20/TopBar.tsx b/src/components/Calendar20/TopBar.tsx index e909453..797f751 100644 --- a/src/components/Calendar20/TopBar.tsx +++ b/src/components/Calendar20/TopBar.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { View, Text, TouchableOpacity, StyleSheet, Platform, StatusBar } from 'react-native'; +import { View, Text, TouchableOpacity, StyleSheet, Platform } from 'react-native'; import { Ionicons } from '@expo/vector-icons'; import { CalendarViewType } from './types'; import { useTranslation } from 'react-i18next'; diff --git a/src/components/WelcomeCarousel/WelcomeCarouselScreen.tsx b/src/components/WelcomeCarousel/WelcomeCarouselScreen.tsx index 0e8e3b0..430fca6 100644 --- a/src/components/WelcomeCarousel/WelcomeCarouselScreen.tsx +++ b/src/components/WelcomeCarousel/WelcomeCarouselScreen.tsx @@ -4,12 +4,12 @@ import { FlatList, Dimensions, Animated, - SafeAreaView, - StatusBar, TouchableOpacity, Text, StyleSheet, } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { StatusBar } from 'expo-status-bar'; import { useNavigation } from '@react-navigation/native'; import type { NavigationProp } from '@react-navigation/native'; import type { RootStackParamList } from '../../types.d'; @@ -79,7 +79,7 @@ export const WelcomeCarouselScreen = () => { return ( - + {/* Skip Button */} diff --git a/src/navigation/screens/About.tsx b/src/navigation/screens/About.tsx index 0a7f1cf..fbb1cbc 100644 --- a/src/navigation/screens/About.tsx +++ b/src/navigation/screens/About.tsx @@ -1,6 +1,8 @@ import { Text } from '@react-navigation/elements'; import React from 'react'; -import { StyleSheet, View, SafeAreaView, StatusBar, ScrollView } from 'react-native'; +import { StyleSheet, View, ScrollView } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { StatusBar } from 'expo-status-bar'; import { Ionicons } from '@expo/vector-icons'; import { useTranslation } from 'react-i18next'; @@ -9,7 +11,7 @@ export default function About() { return ( - + {/* Content */} diff --git a/src/navigation/screens/AccountSettings.tsx b/src/navigation/screens/AccountSettings.tsx index a23ad95..e9d83fa 100644 --- a/src/navigation/screens/AccountSettings.tsx +++ b/src/navigation/screens/AccountSettings.tsx @@ -4,14 +4,14 @@ import { StyleSheet, View, TouchableOpacity, - SafeAreaView, - StatusBar, ScrollView, ActivityIndicator, Alert, Modal, TextInput, } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { StatusBar } from 'expo-status-bar'; import { Ionicons } from '@expo/vector-icons'; import { getValidToken, changeEmail, changeUsername } from '../../services/authService'; import axios from '../../services/axiosInstance'; @@ -167,7 +167,7 @@ export default function AccountSettings() { if (loading) { return ( - + {t('common.messages.loading')} @@ -178,7 +178,7 @@ export default function AccountSettings() { return ( - + {error ? ( diff --git a/src/navigation/screens/BotChat.tsx b/src/navigation/screens/BotChat.tsx index 8b088b5..96bc7b1 100644 --- a/src/navigation/screens/BotChat.tsx +++ b/src/navigation/screens/BotChat.tsx @@ -1,5 +1,6 @@ import React, { useState, useCallback, useEffect, useRef } from 'react'; -import { View, KeyboardAvoidingView, Platform, SafeAreaView, Alert, Keyboard, Dimensions } from 'react-native'; +import { View, KeyboardAvoidingView, Platform, Alert, Keyboard, Dimensions } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; import { sendMessageToBot, createNewChat, formatMessage, clearChatHistory } from '../../services/textBotService'; import { getChatWithMessages, ChatMessage } from '../../services/chatHistoryService'; import { reconstructMessagesFromHistory } from '../../components/BotChat/utils/chatHistoryUtils'; diff --git a/src/navigation/screens/BugReport.tsx b/src/navigation/screens/BugReport.tsx index 42b2800..4e2ed38 100644 --- a/src/navigation/screens/BugReport.tsx +++ b/src/navigation/screens/BugReport.tsx @@ -1,6 +1,8 @@ import { Text } from '@react-navigation/elements'; import React, { useState } from 'react'; -import { StyleSheet, View, TouchableOpacity, SafeAreaView, StatusBar, ScrollView, TextInput, Alert, ActivityIndicator, Platform } from 'react-native'; +import { StyleSheet, View, TouchableOpacity, ScrollView, TextInput, Alert, ActivityIndicator, Platform } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { StatusBar } from 'expo-status-bar'; import { useNavigation, NavigationProp } from '@react-navigation/native'; import { useTranslation } from 'react-i18next'; import { RootStackParamList } from '../../types'; @@ -75,7 +77,7 @@ export default function BugReport() { return ( - + diff --git a/src/navigation/screens/Calendar.tsx b/src/navigation/screens/Calendar.tsx index 9d8580e..f4024c5 100644 --- a/src/navigation/screens/Calendar.tsx +++ b/src/navigation/screens/Calendar.tsx @@ -3,10 +3,10 @@ import { View, StyleSheet, Text, - SafeAreaView, - StatusBar, TouchableOpacity } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { StatusBar } from 'expo-status-bar'; import { Ionicons } from '@expo/vector-icons'; import AsyncStorage from '@react-native-async-storage/async-storage'; import CalendarView from '../../components/Calendar/CalendarView'; @@ -51,14 +51,14 @@ export default function Calendar() { if (isLoading) { return ( - + ); } return ( - + {/* Header con titolo principale e toggle button */} diff --git a/src/navigation/screens/Calendar20.tsx b/src/navigation/screens/Calendar20.tsx index 5bdc4b1..f8663b9 100644 --- a/src/navigation/screens/Calendar20.tsx +++ b/src/navigation/screens/Calendar20.tsx @@ -1,11 +1,13 @@ import React from 'react'; -import { SafeAreaView, StatusBar, StyleSheet } from 'react-native'; +import { StyleSheet } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { StatusBar } from 'expo-status-bar'; import Calendar20View from '../../components/Calendar20/Calendar20View'; export default function Calendar20() { return ( - + ); diff --git a/src/navigation/screens/Categories.tsx b/src/navigation/screens/Categories.tsx index 2c81935..87d1e3d 100644 --- a/src/navigation/screens/Categories.tsx +++ b/src/navigation/screens/Categories.tsx @@ -3,10 +3,10 @@ import { View, StyleSheet, Text, - SafeAreaView, - StatusBar, TouchableOpacity, } from "react-native"; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { StatusBar } from 'expo-status-bar'; import { useFocusEffect } from "@react-navigation/native"; import CategoryList from "../../components/Category/CategoryList"; import AddCategoryButton from "../../components/Category/AddCategoryButton"; @@ -55,7 +55,7 @@ export default function Categories() { return ( - + {/* Header con titolo principale - stesso stile di Home20 */} diff --git a/src/navigation/screens/ChangePassword.tsx b/src/navigation/screens/ChangePassword.tsx index d3a8439..add9218 100644 --- a/src/navigation/screens/ChangePassword.tsx +++ b/src/navigation/screens/ChangePassword.tsx @@ -1,6 +1,8 @@ import { Text } from '@react-navigation/elements'; import React, { useState } from 'react'; -import { StyleSheet, View, TouchableOpacity, SafeAreaView, StatusBar, ScrollView, TextInput, ActivityIndicator, Alert } from 'react-native'; +import { StyleSheet, View, TouchableOpacity, ScrollView, TextInput, ActivityIndicator, Alert } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { StatusBar } from 'expo-status-bar'; import { Ionicons } from '@expo/vector-icons'; import { changePassword } from '../../services/authService'; import { useNavigation } from '@react-navigation/native'; @@ -58,7 +60,7 @@ export default function ChangePassword() { return ( - + diff --git a/src/navigation/screens/EmailVerification.tsx b/src/navigation/screens/EmailVerification.tsx index ed4f981..350c7e2 100644 --- a/src/navigation/screens/EmailVerification.tsx +++ b/src/navigation/screens/EmailVerification.tsx @@ -5,11 +5,11 @@ import { TouchableOpacity, StyleSheet, Dimensions, - StatusBar, - SafeAreaView, Animated, ActivityIndicator, } from "react-native"; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { StatusBar } from 'expo-status-bar'; import { FontAwesome, MaterialIcons } from "@expo/vector-icons"; import { useNavigation, useRoute } from "@react-navigation/native"; import type { StackNavigationProp } from "@react-navigation/stack"; @@ -179,7 +179,7 @@ const EmailVerificationScreen = () => { return ( - + - + diff --git a/src/navigation/screens/Help.tsx b/src/navigation/screens/Help.tsx index c055610..8cbcf1c 100644 --- a/src/navigation/screens/Help.tsx +++ b/src/navigation/screens/Help.tsx @@ -1,6 +1,8 @@ import { Text } from '@react-navigation/elements'; import React from 'react'; -import { StyleSheet, View, SafeAreaView, StatusBar, ScrollView } from 'react-native'; +import { StyleSheet, View, ScrollView } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { StatusBar } from 'expo-status-bar'; import { Ionicons } from '@expo/vector-icons'; import { useTranslation } from 'react-i18next'; @@ -9,7 +11,7 @@ export default function Help() { return ( - + {/* Content */} diff --git a/src/navigation/screens/Home.tsx b/src/navigation/screens/Home.tsx index 50c648f..35374b2 100644 --- a/src/navigation/screens/Home.tsx +++ b/src/navigation/screens/Home.tsx @@ -5,8 +5,6 @@ import { StyleSheet, TextInput, TouchableOpacity, - StatusBar, - SafeAreaView, Animated, Keyboard, KeyboardAvoidingView, @@ -15,6 +13,8 @@ import { Platform, Alert, } from "react-native"; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { StatusBar } from 'expo-status-bar'; import { GestureDetector, Gesture, GestureHandlerRootView } from "react-native-gesture-handler"; import { runOnJS } from "react-native-reanimated"; import { Ionicons } from "@expo/vector-icons"; @@ -37,6 +37,7 @@ import { useTutorialContext } from "../../contexts/TutorialContext"; const HomeScreen = () => { const { t } = useTranslation(); const { startTutorial } = useTutorialContext(); + const [message, setMessage] = useState(""); const [messages, setMessages] = useState([]); const [isLoading, setIsLoading] = useState(false); const [chatStarted, setChatStarted] = useState(false); const [userName, setUserName] = useState("Utente"); @@ -667,7 +668,7 @@ const HomeScreen = () => { return ( - + {/* Header con titolo principale e indicatori sync */} @@ -974,7 +975,7 @@ const styles = StyleSheet.create({ }, header: { paddingHorizontal: 15, - paddingTop: Platform.OS === 'android' ? (StatusBar.currentHeight || 30) + 8 : 8, + paddingTop: 8, paddingBottom: 8, flexDirection: "row", alignItems: "center", diff --git a/src/navigation/screens/Language.tsx b/src/navigation/screens/Language.tsx index 6b1280b..b9bca31 100644 --- a/src/navigation/screens/Language.tsx +++ b/src/navigation/screens/Language.tsx @@ -4,12 +4,12 @@ import { StyleSheet, View, TouchableOpacity, - SafeAreaView, - StatusBar, ScrollView, Alert, ActivityIndicator, } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { StatusBar } from 'expo-status-bar'; import { Ionicons } from '@expo/vector-icons'; import { useLanguage } from '../../contexts/LanguageContext'; import { useTranslation } from 'react-i18next'; @@ -54,7 +54,7 @@ export default function Language() { return ( - + diff --git a/src/navigation/screens/Login.tsx b/src/navigation/screens/Login.tsx index 13238ee..ce2d1aa 100644 --- a/src/navigation/screens/Login.tsx +++ b/src/navigation/screens/Login.tsx @@ -6,8 +6,6 @@ import { TouchableOpacity, StyleSheet, Dimensions, - StatusBar, - SafeAreaView, AppState, Image, Animated, @@ -28,6 +26,8 @@ import { trackLoginFailed, identifyUser, } from "../../services/analyticsService"; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { StatusBar } from 'expo-status-bar'; const { width, height } = Dimensions.get("window"); @@ -264,7 +264,7 @@ const LoginScreen = () => { return ( - + {/* Blob di sfondo – fuori dal layout, posizione assoluta */} diff --git a/src/navigation/screens/MemorySettings.tsx b/src/navigation/screens/MemorySettings.tsx index ecf1172..7f0485e 100644 --- a/src/navigation/screens/MemorySettings.tsx +++ b/src/navigation/screens/MemorySettings.tsx @@ -3,8 +3,6 @@ import { View, Text, StyleSheet, - SafeAreaView, - StatusBar, ScrollView, TouchableOpacity, Alert, @@ -15,6 +13,8 @@ import { KeyboardAvoidingView, Platform, } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { StatusBar } from 'expo-status-bar'; import { Ionicons } from '@expo/vector-icons'; import { useTranslation } from 'react-i18next'; import axiosInstance from '../../services/axiosInstance'; @@ -162,7 +162,7 @@ export default function MemorySettingsScreen() { if (loading) { return ( - + {t('memorySettings.loading')} @@ -173,7 +173,7 @@ export default function MemorySettingsScreen() { return ( - + diff --git a/src/navigation/screens/Notes.tsx b/src/navigation/screens/Notes.tsx index 6cadfbe..ac79363 100644 --- a/src/navigation/screens/Notes.tsx +++ b/src/navigation/screens/Notes.tsx @@ -2,11 +2,11 @@ import React from 'react'; import { View, StyleSheet, - SafeAreaView, TouchableOpacity, Alert, Platform, } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; import { GestureHandlerRootView } from 'react-native-gesture-handler'; import Animated, { useSharedValue, useAnimatedStyle, withSpring } from 'react-native-reanimated'; import { NotesProvider, useNotesActions, useNotesState } from '../../context/NotesContext'; diff --git a/src/navigation/screens/NotificationDebug.tsx b/src/navigation/screens/NotificationDebug.tsx index 13c8e60..341c13a 100644 --- a/src/navigation/screens/NotificationDebug.tsx +++ b/src/navigation/screens/NotificationDebug.tsx @@ -4,11 +4,11 @@ import { Text, StyleSheet, TouchableOpacity, - SafeAreaView, - StatusBar, ScrollView, Alert, } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { StatusBar } from 'expo-status-bar'; import { useNavigation } from '@react-navigation/native'; import { Ionicons } from '@expo/vector-icons'; import { NotificationManager } from '../../components/Debug/NotificationManager'; @@ -86,7 +86,7 @@ export default function NotificationDebugScreen() { return ( - + {/* Header */} diff --git a/src/navigation/screens/NotificationSettings.tsx b/src/navigation/screens/NotificationSettings.tsx index 134c22f..4d38c0e 100644 --- a/src/navigation/screens/NotificationSettings.tsx +++ b/src/navigation/screens/NotificationSettings.tsx @@ -3,8 +3,6 @@ import { View, Text, StyleSheet, - SafeAreaView, - StatusBar, ScrollView, TouchableOpacity, Alert, @@ -12,6 +10,8 @@ import { Switch, Animated, } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { StatusBar } from 'expo-status-bar'; import { Ionicons } from '@expo/vector-icons'; import { useTranslation } from 'react-i18next'; import * as Localization from 'expo-localization'; @@ -167,7 +167,7 @@ export default function NotificationSettingsScreen() { if (loading) { return ( - + {t('notificationSettings.loading')} @@ -182,7 +182,7 @@ export default function NotificationSettingsScreen() { return ( - + diff --git a/src/navigation/screens/Profile.tsx b/src/navigation/screens/Profile.tsx index 8121577..4416bfd 100644 --- a/src/navigation/screens/Profile.tsx +++ b/src/navigation/screens/Profile.tsx @@ -6,10 +6,10 @@ import { StyleSheet, Dimensions, ScrollView, - StatusBar, Animated, - SafeAreaView, } from "react-native"; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { StatusBar } from 'expo-status-bar'; import { Ionicons } from "@expo/vector-icons"; import { useNavigation, NavigationProp } from "@react-navigation/native"; import { useTranslation } from "react-i18next"; @@ -178,7 +178,7 @@ const ProfileScreen = () => { return ( <> - + diff --git a/src/navigation/screens/Register.tsx b/src/navigation/screens/Register.tsx index 6f56ae1..51c8c16 100644 --- a/src/navigation/screens/Register.tsx +++ b/src/navigation/screens/Register.tsx @@ -6,8 +6,6 @@ import { TouchableOpacity, StyleSheet, Dimensions, - StatusBar, - SafeAreaView, Image, Animated, ScrollView, @@ -19,6 +17,8 @@ import type { RootStackParamList } from "../../types"; import * as authService from "../../services/authService"; import { NotificationSnackbar } from "../../components/UI/NotificationSnackbar"; import { useTranslation } from "react-i18next"; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { StatusBar } from 'expo-status-bar'; const { width } = Dimensions.get("window"); @@ -190,7 +190,7 @@ const RegisterScreen = () => { return ( - + {/* Blob di sfondo */} diff --git a/src/navigation/screens/Settings.tsx b/src/navigation/screens/Settings.tsx index 65c2fed..d050299 100644 --- a/src/navigation/screens/Settings.tsx +++ b/src/navigation/screens/Settings.tsx @@ -1,6 +1,8 @@ import { Text } from '@react-navigation/elements'; import React from 'react'; -import { StyleSheet, View, TouchableOpacity, SafeAreaView, StatusBar, ScrollView, Alert } from 'react-native'; +import { StyleSheet, View, TouchableOpacity, ScrollView, Alert } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { StatusBar } from 'expo-status-bar'; import { useNavigation, NavigationProp } from '@react-navigation/native'; import { RootStackParamList } from '../../types'; import { Ionicons } from '@expo/vector-icons'; @@ -89,7 +91,7 @@ export default function Settings() { return ( - + {/* Content */} diff --git a/src/navigation/screens/Statistics.tsx b/src/navigation/screens/Statistics.tsx index 7571ebd..f47b081 100644 --- a/src/navigation/screens/Statistics.tsx +++ b/src/navigation/screens/Statistics.tsx @@ -3,13 +3,13 @@ import { View, Text, StyleSheet, - SafeAreaView, - StatusBar, ScrollView, RefreshControl, TouchableOpacity, Animated, } from 'react-native'; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { StatusBar } from 'expo-status-bar'; import { useFocusEffect } from '@react-navigation/native'; import { Ionicons } from '@expo/vector-icons'; import { useTranslation } from 'react-i18next'; @@ -97,7 +97,7 @@ export default function Statistics() { if (error && !dashboardData) { return ( - + {t('statistics.title')} @@ -251,7 +251,7 @@ export default function Statistics() { return ( - + {t('statistics.title')} diff --git a/src/navigation/screens/VerificationSuccess.tsx b/src/navigation/screens/VerificationSuccess.tsx index 45ea820..b31f9c5 100644 --- a/src/navigation/screens/VerificationSuccess.tsx +++ b/src/navigation/screens/VerificationSuccess.tsx @@ -5,10 +5,10 @@ import { TouchableOpacity, StyleSheet, Dimensions, - StatusBar, - SafeAreaView, Animated, } from "react-native"; +import { SafeAreaView } from 'react-native-safe-area-context'; +import { StatusBar } from 'expo-status-bar'; import { MaterialIcons, FontAwesome } from "@expo/vector-icons"; import { useNavigation, useRoute } from "@react-navigation/native"; import type { StackNavigationProp } from "@react-navigation/stack"; @@ -205,7 +205,7 @@ const VerificationSuccessScreen = () => { return ( - + - + {t('voiceSettings.loading')} @@ -125,7 +125,7 @@ export default function VoiceSettingsScreen() { return ( - +