Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 19 additions & 14 deletions src/screens/CalendarScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -663,20 +663,25 @@ export default function CalendarScreen() {
<Text style={[s.stepLabel, { color: colors.textSub }]}>
{t('calPickName')} ({parsedSchedule.employees.length} trovati)
</Text>
<FlatList
data={parsedSchedule.employees}
keyExtractor={(_, i) => String(i)}
style={{ maxHeight: 400 }}
nestedScrollEnabled
renderItem={({ item }) => (
<TouchableOpacity
style={[s.nameRow, { borderColor: colors.border }]}
onPress={() => selectEmployee(item)}
>
<Text style={[s.nameText, { color: colors.text }]}>{item.name}</Text>
<MaterialIcons name="chevron-right" size={20} color={colors.textSub} />
</TouchableOpacity>
)}
<FlatList
data={parsedSchedule.employees}
keyExtractor={(_, i) => String(i)}
style={{ maxHeight: 400 }}
nestedScrollEnabled
renderItem={({ item }) => (
<TouchableOpacity
style={[s.nameRow, { borderColor: colors.border }]}
onPress={() => selectEmployee(item)}
>
<Text style={[s.nameText, { color: colors.text }]}>{item.name}</Text>
<MaterialIcons name="chevron-right" size={20} color={colors.textSub} />
</TouchableOpacity>
)}
// Performance optimization: Virtualization props to reduce memory and render time for large lists
initialNumToRender={15}
maxToRenderPerBatch={10}
windowSize={5}
removeClippedSubviews={true}
/>
</>
)}
Expand Down
5 changes: 5 additions & 0 deletions src/screens/FlightScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,11 @@ export default function FlightScreen() {
refreshControl={<RefreshControl refreshing={refreshing} onRefresh={() => { setRefreshing(true); fetchAll(); }} tintColor={colors.primary} />}
ListEmptyComponent={<Text style={{ textAlign: 'center', marginTop: 40, color: '#9CA3AF', fontSize: 15 }}>{t('flightNoFlights')}</Text>}
showsVerticalScrollIndicator={false}
// Performance optimization: Virtualization props to reduce memory and render time for large lists
initialNumToRender={15}
maxToRenderPerBatch={10}
windowSize={5}
removeClippedSubviews={true}
/>
)}

Expand Down
5 changes: 5 additions & 0 deletions src/screens/PasswordScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,11 @@ export default function PasswordScreen() {
</View>
}
showsVerticalScrollIndicator={false}
// Performance optimization: Virtualization props to reduce memory and render time for large lists
initialNumToRender={15}
maxToRenderPerBatch={10}
windowSize={5}
removeClippedSubviews={true}
/>

{/* Add / Edit modal */}
Expand Down
Loading