mirror of
https://github.com/bulwarkmail/native.git
synced 2026-11-04 16:06:41 +00:00
fix: end the unified inbox and scheduled lists above the gesture bar
This commit is contained in:
@@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import {
|
import {
|
||||||
View, Text, StyleSheet, FlatList, ActivityIndicator, Pressable, Alert, Modal, Platform,
|
View, Text, StyleSheet, FlatList, ActivityIndicator, Pressable, Alert, Modal, Platform,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||||
import { ArrowLeft, Clock, MoreHorizontal } from 'lucide-react-native';
|
import { ArrowLeft, Clock, MoreHorizontal } from 'lucide-react-native';
|
||||||
import DateTimePicker, { type DateTimePickerEvent } from '@react-native-community/datetimepicker';
|
import DateTimePicker, { type DateTimePickerEvent } from '@react-native-community/datetimepicker';
|
||||||
import type { NativeStackScreenProps } from '@react-navigation/native-stack';
|
import type { NativeStackScreenProps } from '@react-navigation/native-stack';
|
||||||
@@ -33,6 +33,7 @@ export default function ScheduledScreen({ navigation }: Props) {
|
|||||||
const c = useColors();
|
const c = useColors();
|
||||||
const styles = React.useMemo(() => makeStyles(c), [c]);
|
const styles = React.useMemo(() => makeStyles(c), [c]);
|
||||||
const t = useLocaleStore((s) => s.t);
|
const t = useLocaleStore((s) => s.t);
|
||||||
|
const insets = useSafeAreaInsets();
|
||||||
const locale = useLocaleStore((s) => s.locale);
|
const locale = useLocaleStore((s) => s.locale);
|
||||||
const timeFormat = useSettingsStore((s) => s.timeFormat);
|
const timeFormat = useSettingsStore((s) => s.timeFormat);
|
||||||
const mailboxes = useEmailStore((s) => s.mailboxes);
|
const mailboxes = useEmailStore((s) => s.mailboxes);
|
||||||
@@ -276,7 +277,7 @@ export default function ScheduledScreen({ navigation }: Props) {
|
|||||||
] : [];
|
] : [];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SafeAreaView style={styles.container} edges={['top']}>
|
<SafeAreaView style={styles.container} edges={['top', 'left', 'right']}>
|
||||||
<View style={styles.header}>
|
<View style={styles.header}>
|
||||||
<Pressable
|
<Pressable
|
||||||
onPress={() => navigation.goBack()}
|
onPress={() => navigation.goBack()}
|
||||||
@@ -316,7 +317,8 @@ export default function ScheduledScreen({ navigation }: Props) {
|
|||||||
keyExtractor={(i) => i.emailSubmissionId}
|
keyExtractor={(i) => i.emailSubmissionId}
|
||||||
renderItem={renderItem}
|
renderItem={renderItem}
|
||||||
ItemSeparatorComponent={() => <View style={styles.separator} />}
|
ItemSeparatorComponent={() => <View style={styles.separator} />}
|
||||||
contentContainerStyle={styles.listContent}
|
// A stack screen has no tab bar: the list ends clear of the gesture bar.
|
||||||
|
contentContainerStyle={[styles.listContent, { paddingBottom: insets.bottom + spacing.sm }]}
|
||||||
refreshing={loading}
|
refreshing={loading}
|
||||||
onRefresh={() => { void load(); }}
|
onRefresh={() => { void load(); }}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import {
|
import {
|
||||||
View, Text, StyleSheet, FlatList, ActivityIndicator, Pressable, TextInput, Alert, AppState,
|
View, Text, StyleSheet, FlatList, ActivityIndicator, Pressable, TextInput, Alert, AppState,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||||
import { useFocusEffect } from '@react-navigation/native';
|
import { useFocusEffect } from '@react-navigation/native';
|
||||||
import {
|
import {
|
||||||
ArrowLeft, Star, Paperclip, AlertTriangle, Search, X, Square, SquareCheck,
|
ArrowLeft, Star, Paperclip, AlertTriangle, Search, X, Square, SquareCheck,
|
||||||
@@ -49,6 +49,7 @@ export default function UnifiedInboxScreen({ navigation, route }: Props) {
|
|||||||
const c = useColors();
|
const c = useColors();
|
||||||
const styles = React.useMemo(() => makeStyles(c), [c]);
|
const styles = React.useMemo(() => makeStyles(c), [c]);
|
||||||
const t = useLocaleStore((s) => s.t);
|
const t = useLocaleStore((s) => s.t);
|
||||||
|
const insets = useSafeAreaInsets();
|
||||||
const role: UnifiedRole = route.params?.role ?? 'inbox';
|
const role: UnifiedRole = route.params?.role ?? 'inbox';
|
||||||
const view: CrossView | undefined = route.params?.view;
|
const view: CrossView | undefined = route.params?.view;
|
||||||
const accounts = useAccountStore((s) => s.accounts);
|
const accounts = useAccountStore((s) => s.accounts);
|
||||||
@@ -381,7 +382,7 @@ export default function UnifiedInboxScreen({ navigation, route }: Props) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SafeAreaView style={styles.container} edges={['top']}>
|
<SafeAreaView style={styles.container} edges={['top', 'left', 'right']}>
|
||||||
{selectionMode ? (
|
{selectionMode ? (
|
||||||
<View style={styles.header}>
|
<View style={styles.header}>
|
||||||
<Pressable
|
<Pressable
|
||||||
@@ -527,7 +528,8 @@ export default function UnifiedInboxScreen({ navigation, route }: Props) {
|
|||||||
onEndReached={() => { void loadMore(); }}
|
onEndReached={() => { void loadMore(); }}
|
||||||
onEndReachedThreshold={0.3}
|
onEndReachedThreshold={0.3}
|
||||||
ListFooterComponent={loadingMore ? <ActivityIndicator style={{ padding: spacing.md }} color={c.primary} /> : null}
|
ListFooterComponent={loadingMore ? <ActivityIndicator style={{ padding: spacing.md }} color={c.primary} /> : null}
|
||||||
contentContainerStyle={{ paddingBottom: 40 }}
|
// A stack screen has no tab bar: the list ends clear of the gesture bar.
|
||||||
|
contentContainerStyle={{ paddingBottom: insets.bottom + 40 }}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</SafeAreaView>
|
</SafeAreaView>
|
||||||
|
|||||||
Reference in New Issue
Block a user