Skip to content
Source
Sign inSign up
pingdotgg/t3code

Gate iOS glass layout on native support #4032

Mergedjuliusmarmingemerged 3 commits intomain fromrefs/pull/4032/headmerged by juliusmarminge View on GitHub

Showing 10 changed files with 19 additions and 15 deletions (loading 7).

x
0 of 10 viewed, 10 left
7 additions and 11 deletionsapps/mobile/src/features/files/FileTreeBrowser.tsxModified
View file
@@ -1,20 +1,14 @@
import type { ProjectEntry } from "@t3tools/contracts";
import { SymbolView } from "../../components/AppSymbol";
import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
-import {
- ActivityIndicator,
- FlatList,
- Platform,
- Pressable,
- RefreshControl,
- View,
-} from "react-native";
+import { ActivityIndicator, FlatList, Pressable, RefreshControl, View } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
​
import { AppText as Text } from "../../components/AppText";
import { PierreEntryIcon } from "../../components/PierreEntryIcon";
import { cn } from "../../lib/cn";
import { useThemeColor } from "../../lib/useThemeColor";
+import { NATIVE_LIQUID_GLASS_SUPPORTED } from "../../native/native-glass";
import {
buildFileTree,
defaultExpandedTreePaths,
@@ -129,7 +123,7 @@
const insets = useSafeAreaInsets();
// Native transparent-header height ≈ safe-area top + nav bar (~44). Matches the
// observed adjustedContentInset bottom (~102) seen in the native trace.
- const headerInset = Platform.OS === "ios" ? insets.top + 44 : 0;
+ const headerInset = NATIVE_LIQUID_GLASS_SUPPORTED ? insets.top + 44 : 0;
const iconColor = String(useThemeColor("--color-icon-muted"));