fix: keep folder, calendar and share sheets and compose prompts above the taskbar and keyboard

This commit is contained in:
Linus Rath
2026-10-31 14:12:58 +01:00
parent 5ecf6f3256
commit 9b0bba7c15
5 changed files with 87 additions and 35 deletions
@@ -22,6 +22,7 @@ import { useColors } from '../../theme/colors';
import { useLocaleStore } from '../../stores/locale-store';
import { MODAL_ORIENTATIONS } from '../../lib/modal-orientations';
import { useSheetInsets } from '../../lib/use-layout';
import { useSheetBottomInset } from '../../lib/sheet-bottom-inset';
/** A role the sheet offers: its rights and the webmail's name for it. */
export interface SharePreset<R> {
@@ -64,6 +65,8 @@ export function ShareCollectionSheet<R extends object>({
}: ShareCollectionSheetProps<R>) {
// Centred on a wide window, clear of side insets in landscape.
const sheetInsets = useSheetInsets();
// Done above a tablet's taskbar, the search field above the keyboard.
const bottomInset = useSheetBottomInset();
const c = useColors();
const styles = React.useMemo(() => makeStyles(c), [c]);
const t = useLocaleStore((s) => s.t);
@@ -208,7 +211,7 @@ export function ShareCollectionSheet<R extends object>({
<TouchableWithoutFeedback accessible={false} onPress={onClose}>
<View style={[styles.backdrop, { paddingLeft: sheetInsets.left, paddingRight: sheetInsets.right }]}>
<TouchableWithoutFeedback accessible={false}>
<View style={styles.sheet}>
<View style={[styles.sheet, { paddingBottom: spacing.xxl + bottomInset }]}>
<View style={styles.titleRow}>
<Users size={18} color={c.textMuted} />
<Text style={styles.title} numberOfLines={1}>