mirror of
https://github.com/bulwarkmail/native.git
synced 2026-11-04 00:06:53 +00:00
fix: keep folder, calendar and share sheets and compose prompts above the taskbar and keyboard
This commit is contained in:
@@ -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}>
|
||||
|
||||
Reference in New Issue
Block a user