Skip to content

Commit 516dba4

Browse files
authored
Merge pull request #20 from Gabry848/fix/android-edge-to-edge-orientation
fix(android): risolvi warning Play Store su edge-to-edge e orientamento
2 parents 537ff11 + fb4763e commit 516dba4

32 files changed

Lines changed: 109 additions & 88 deletions

app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "My taskly",
44
"slug": "mytaskly",
55
"version": "1.0.0",
6-
"orientation": "portrait",
6+
"orientation": "default",
77
"icon": "./assets/icons/ios-light.png",
88
"userInterfaceStyle": "automatic",
99
"newArchEnabled": false,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"react-native-chat-ui": "^0.1.9",
7474
"react-native-copilot": "^3.3.3",
7575
"react-native-dotenv": "^3.4.11",
76-
"react-native-edge-to-edge": "1.6.0",
76+
"react-native-edge-to-edge": "1.8.1",
7777
"react-native-gesture-handler": "~2.24.0",
7878
"react-native-keyboard-aware-scrollview": "^2.1.0",
7979
"react-native-markdown-display": "^7.0.2",

src/components/BotChat/ChatHeader.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
import React from 'react';
2-
import { StyleSheet, View, Text, TouchableOpacity, StatusBar } from 'react-native';
2+
import { StyleSheet, View, Text, TouchableOpacity } from 'react-native';
3+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
34
import { MaterialIcons } from '@expo/vector-icons';
45
import { ChatHeaderProps } from './types';
56

6-
const ChatHeader: React.FC<ChatHeaderProps> = ({
7-
modelType,
8-
onModelChange,
7+
const ChatHeader: React.FC<ChatHeaderProps> = ({
8+
modelType,
9+
onModelChange,
910
onNewChat,
10-
style
11+
style
1112
}) => {
13+
const insets = useSafeAreaInsets();
1214
return (
13-
<View style={[styles.header, style]}>
15+
<View style={[styles.header, { paddingTop: insets.top + 5 }, style]}>
1416
<View style={styles.actions}>
1517
<TouchableOpacity
1618
style={styles.modelSelector}
@@ -40,7 +42,7 @@ const styles = StyleSheet.create({
4042
justifyContent: "flex-end",
4143
width: "100%",
4244
padding: 8,
43-
paddingTop: StatusBar.currentHeight ? StatusBar.currentHeight + 5 : 15,
45+
paddingTop: 15,
4446
paddingBottom: 8,
4547
backgroundColor: "#FFFFFF",
4648
shadowColor: "#000",

src/components/BotChat/VoiceCalendarModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import {
66
TouchableOpacity,
77
Animated,
88
Dimensions,
9-
StatusBar,
109
StyleSheet,
1110
Platform,
1211
} from "react-native";
12+
import { StatusBar } from 'expo-status-bar';
1313
import { Ionicons } from "@expo/vector-icons";
1414
import CalendarView from "../Calendar/CalendarView";
1515

@@ -72,7 +72,7 @@ const VoiceCalendarModal: React.FC<VoiceCalendarModalProps> = ({ visible, onClos
7272
statusBarTranslucent
7373
onRequestClose={handleClose}
7474
>
75-
<StatusBar barStyle="dark-content" backgroundColor="#FFFFFF" />
75+
<StatusBar style="dark" />
7676

7777
{/* Overlay sfondo scuro */}
7878
<Animated.View style={[styles.backdrop, { opacity: fadeAnim }]} pointerEvents="none" />

src/components/BotChat/VoiceChatExample.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React, { useState } from 'react';
2-
import { View, Text, StyleSheet, TouchableOpacity, SafeAreaView } from 'react-native';
2+
import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';
3+
import { SafeAreaView } from 'react-native-safe-area-context';
34
import { MaterialIcons } from '@expo/vector-icons';
45
import VoiceChatModal from './VoiceChatModal';
56
import VoiceCalendarModal from './VoiceCalendarModal';

src/components/BotChat/VoiceChatModal.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ import {
77
TouchableOpacity,
88
Animated,
99
Dimensions,
10-
StatusBar,
1110
Alert,
1211
Platform,
1312
ScrollView,
1413
} from "react-native";
14+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
15+
import { StatusBar } from 'expo-status-bar';
1516
import Svg, { Path, Defs, RadialGradient, Stop } from "react-native-svg";
1617
import { Ionicons } from "@expo/vector-icons";
1718
import { useVoiceChat, ActiveTool } from '../../hooks/useVoiceChat';
@@ -224,6 +225,7 @@ const VoiceChatModal: React.FC<VoiceChatModalProps> = ({
224225
onClose,
225226
onOpenCalendar,
226227
}) => {
228+
const insets = useSafeAreaInsets();
227229
const {
228230
state,
229231
error,
@@ -383,7 +385,7 @@ const VoiceChatModal: React.FC<VoiceChatModalProps> = ({
383385
statusBarTranslucent={true}
384386
onRequestClose={handleClose}
385387
>
386-
<StatusBar barStyle="dark-content" backgroundColor="#FFFFFF" />
388+
<StatusBar style="dark" />
387389

388390
<Animated.View
389391
style={[
@@ -395,7 +397,7 @@ const VoiceChatModal: React.FC<VoiceChatModalProps> = ({
395397
]}
396398
>
397399
{/* Header */}
398-
<View style={styles.header}>
400+
<View style={[styles.header, { paddingTop: insets.top + 16 }]}>
399401
{isConnected ? (
400402
<View style={styles.liveIndicator}>
401403
<Animated.View style={[styles.liveDot, { opacity: liveDotOpacity }]} />
@@ -542,7 +544,7 @@ const styles = StyleSheet.create({
542544

543545
// Header
544546
header: {
545-
paddingTop: StatusBar.currentHeight ? StatusBar.currentHeight + 16 : 52,
547+
paddingTop: 52,
546548
paddingHorizontal: 20,
547549
paddingBottom: 14,
548550
flexDirection: "row",

src/components/Calendar20/TopBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { View, Text, TouchableOpacity, StyleSheet, Platform, StatusBar } from 'react-native';
2+
import { View, Text, TouchableOpacity, StyleSheet, Platform } from 'react-native';
33
import { Ionicons } from '@expo/vector-icons';
44
import { CalendarViewType } from './types';
55
import { useTranslation } from 'react-i18next';

src/components/WelcomeCarousel/WelcomeCarouselScreen.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import {
44
FlatList,
55
Dimensions,
66
Animated,
7-
SafeAreaView,
8-
StatusBar,
97
TouchableOpacity,
108
Text,
119
StyleSheet,
1210
} from 'react-native';
11+
import { SafeAreaView } from 'react-native-safe-area-context';
12+
import { StatusBar } from 'expo-status-bar';
1313
import { useNavigation } from '@react-navigation/native';
1414
import type { NavigationProp } from '@react-navigation/native';
1515
import type { RootStackParamList } from '../../types.d';
@@ -79,7 +79,7 @@ export const WelcomeCarouselScreen = () => {
7979

8080
return (
8181
<SafeAreaView style={styles.container}>
82-
<StatusBar barStyle="dark-content" backgroundColor="#FFFFFF" />
82+
<StatusBar style="dark" />
8383

8484
{/* Skip Button */}
8585
<TouchableOpacity style={styles.skipButton} onPress={handleSkip} activeOpacity={0.7}>

src/navigation/screens/About.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { Text } from '@react-navigation/elements';
22
import React from 'react';
3-
import { StyleSheet, View, SafeAreaView, StatusBar, ScrollView } from 'react-native';
3+
import { StyleSheet, View, ScrollView } from 'react-native';
4+
import { SafeAreaView } from 'react-native-safe-area-context';
5+
import { StatusBar } from 'expo-status-bar';
46
import { Ionicons } from '@expo/vector-icons';
57
import { useTranslation } from 'react-i18next';
68

@@ -9,7 +11,7 @@ export default function About() {
911

1012
return (
1113
<SafeAreaView style={styles.container}>
12-
<StatusBar barStyle="dark-content" backgroundColor="#ffffff" />
14+
<StatusBar style="dark" />
1315

1416
{/* Content */}
1517
<ScrollView style={styles.content}>

src/navigation/screens/AccountSettings.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import {
44
StyleSheet,
55
View,
66
TouchableOpacity,
7-
SafeAreaView,
8-
StatusBar,
97
ScrollView,
108
ActivityIndicator,
119
Alert,
1210
Modal,
1311
TextInput,
1412
} from 'react-native';
13+
import { SafeAreaView } from 'react-native-safe-area-context';
14+
import { StatusBar } from 'expo-status-bar';
1515
import { Ionicons } from '@expo/vector-icons';
1616
import { getValidToken, changeEmail, changeUsername } from '../../services/authService';
1717
import axios from '../../services/axiosInstance';
@@ -167,7 +167,7 @@ export default function AccountSettings() {
167167
if (loading) {
168168
return (
169169
<SafeAreaView style={styles.container}>
170-
<StatusBar barStyle="dark-content" backgroundColor="#ffffff" />
170+
<StatusBar style="dark" />
171171
<View style={styles.loadingContainer}>
172172
<ActivityIndicator size="large" color="#000000" />
173173
<Text style={styles.loadingText}>{t('common.messages.loading')}</Text>
@@ -178,7 +178,7 @@ export default function AccountSettings() {
178178

179179
return (
180180
<SafeAreaView style={styles.container}>
181-
<StatusBar barStyle="dark-content" backgroundColor="#ffffff" />
181+
<StatusBar style="dark" />
182182

183183
<ScrollView style={styles.content} showsVerticalScrollIndicator={false}>
184184
{error ? (

0 commit comments

Comments
 (0)