Use native edge chrome on file and review routes
This commit is contained in:
1 parent
2c00d79902
commit
0f3201e699
2 files changed
+21
No files matched your search
@@ -4,6 +4,7 @@ import { useLocalSearchParams, useRouter } from "expo-router";
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||
import {
|
||||
ActivityIndicator,
|
||||
Platform,
|
||||
Pressable,
|
||||
ScrollView,
|
||||
Text as RNText,
|
||||
@@ -24,6 +25,7 @@ import { EmptyState } from "../../components/EmptyState";
|
||||
import { LoadingScreen } from "../../components/LoadingScreen";
|
||||
import { cn } from "../../lib/cn";
|
||||
import { resolveFileSelectionNavigationAction } from "../../lib/adaptive-navigation";
|
||||
import { nativeTopScrollEdgeEffect } from "../../lib/native-scroll-edge-effect";
|
||||
import { tryOpenExternalUrl } from "../../lib/openExternalUrl";
|
||||
import { buildThreadFilesNavigation, buildThreadRoutePath } from "../../lib/routes";
|
||||
import { MOBILE_TYPOGRAPHY } from "../../lib/typography";
|
||||
@@ -58,6 +60,7 @@ import {
|
||||
import { useWorkspaceFileAssetUrl } from "./workspaceFileAssetUrl";
|
||||
|
||||
type FileViewMode = "preview" | "source";
|
||||
const TOP_SCROLL_EDGE_EFFECT = nativeTopScrollEdgeEffect(Platform.OS, Platform.Version);
|
||||
|
||||
function firstRouteParam(value: string | string[] | undefined): string | null {
|
||||
if (Array.isArray(value)) {
|
||||
@@ -579,6 +582,13 @@ export function ThreadFilesTreeScreen() {
|
||||
headerStyle: { backgroundColor: "transparent" },
|
||||
headerShadowVisible: false,
|
||||
headerTitle: renderHeaderTitle,
|
||||
scrollEdgeEffects: {
|
||||
top: TOP_SCROLL_EDGE_EFFECT,
|
||||
bottom: "hidden",
|
||||
left: "hidden",
|
||||
right: "hidden",
|
||||
},
|
||||
unstable_navigationItemStyle: Platform.OS === "ios" ? "editor" : undefined,
|
||||
headerSearchBarOptions: {
|
||||
allowToolbarIntegration: true,
|
||||
autoCapitalize: "none",
|
||||
|
||||
@@ -17,6 +17,7 @@ import {
|
||||
import {
|
||||
ActivityIndicator,
|
||||
FlatList,
|
||||
Platform,
|
||||
Pressable,
|
||||
ScrollView,
|
||||
type NativeSyntheticEvent,
|
||||
@@ -31,6 +32,7 @@ import { AppText as Text } from "../../components/AppText";
|
||||
import { environmentCatalog } from "../../connection/catalog";
|
||||
import { useEnvironmentPresentation } from "../../state/presentation";
|
||||
import { useAtomCommand } from "../../state/use-atom-command";
|
||||
import { nativeTopScrollEdgeEffect } from "../../lib/native-scroll-edge-effect";
|
||||
import { useThemeColor } from "../../lib/useThemeColor";
|
||||
import { MOBILE_TYPOGRAPHY } from "../../lib/typography";
|
||||
import { useThreadDraftForThread } from "../../state/use-thread-composer-state";
|
||||
@@ -59,6 +61,8 @@ import { resolveReviewAvailability } from "./reviewAvailability";
|
||||
import { resolveSelectedReviewFileId } from "./reviewPaneSelection";
|
||||
import { buildReviewSectionMenu } from "./review-section-menu";
|
||||
|
||||
const TOP_SCROLL_EDGE_EFFECT = nativeTopScrollEdgeEffect(Platform.OS, Platform.Version);
|
||||
|
||||
const REVIEW_HEADER_SPACING = 0;
|
||||
|
||||
const ReviewNotice = memo(function ReviewNotice(props: { readonly notice: string }) {
|
||||
@@ -589,6 +593,13 @@ export function ReviewSheet() {
|
||||
backgroundColor: "transparent",
|
||||
},
|
||||
headerTitle: renderHeaderTitle,
|
||||
scrollEdgeEffects: {
|
||||
top: TOP_SCROLL_EDGE_EFFECT,
|
||||
bottom: "hidden",
|
||||
left: "hidden",
|
||||
right: "hidden",
|
||||
},
|
||||
unstable_navigationItemStyle: Platform.OS === "ios" ? "editor" : undefined,
|
||||
}}
|
||||
/>
|
||||
|
||||
|
||||
Reference in new issue
Block a user