Use shared native scroll edge effect in thread surfaces
This commit is contained in:
1 parent
9e52f110e2
commit
2c00d79902
2 files changed
+7
-2
No files matched your search
@@ -25,6 +25,7 @@ import {
|
||||
ActivityIndicator,
|
||||
Image,
|
||||
Linking,
|
||||
Platform,
|
||||
type LayoutChangeEvent,
|
||||
type NativeScrollEvent,
|
||||
type NativeSyntheticEvent,
|
||||
@@ -68,6 +69,7 @@ import {
|
||||
import { buildReviewParsedDiff } from "../review/reviewModel";
|
||||
import { cn } from "../../lib/cn";
|
||||
import { deriveCenteredContentHorizontalPadding, type LayoutVariant } from "../../lib/layout";
|
||||
import { nativeTopScrollEdgeEffect } from "../../lib/native-scroll-edge-effect";
|
||||
import { buildThreadFilesNavigation } from "../../lib/routes";
|
||||
import { MOBILE_CODE_SURFACE, MOBILE_TYPOGRAPHY } from "../../lib/typography";
|
||||
import { markdownFileIconSource } from "@t3tools/mobile-markdown-text/file-icons";
|
||||
@@ -86,6 +88,7 @@ const MESSAGE_TIME_FORMATTER = new Intl.DateTimeFormat(undefined, {
|
||||
hour: "numeric",
|
||||
minute: "2-digit",
|
||||
});
|
||||
const TOP_SCROLL_EDGE_EFFECT = nativeTopScrollEdgeEffect(Platform.OS, Platform.Version);
|
||||
|
||||
function formatMessageTime(input: string): string {
|
||||
const timestamp = Date.parse(input);
|
||||
@@ -1499,7 +1502,7 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
|
||||
<ScrollViewMarker
|
||||
style={{ flex: 1 }}
|
||||
scrollEdgeEffects={{
|
||||
top: "automatic",
|
||||
top: TOP_SCROLL_EDGE_EFFECT,
|
||||
right: "hidden",
|
||||
bottom: "hidden",
|
||||
left: "hidden",
|
||||
|
||||
@@ -14,6 +14,7 @@ import Svg, { Defs, LinearGradient, Rect, Stop } from "react-native-svg";
|
||||
import { AppText as Text } from "../../components/AppText";
|
||||
import { ControlPillMenu } from "../../components/ControlPill";
|
||||
import { StatusPill } from "../../components/StatusPill";
|
||||
import { nativeTopScrollEdgeEffect } from "../../lib/native-scroll-edge-effect";
|
||||
import { scopedThreadKey } from "../../lib/scopedEntities";
|
||||
import { relativeTime } from "../../lib/time";
|
||||
import { useThemeColor } from "../../lib/useThemeColor";
|
||||
@@ -39,6 +40,7 @@ import { threadStatusTone } from "./threadPresentation";
|
||||
|
||||
const SIDEBAR_STICKY_HEADER_HEIGHT = 106;
|
||||
const SIDEBAR_STICKY_HEADER_FADE_HEIGHT = 44;
|
||||
const TOP_SCROLL_EDGE_EFFECT = nativeTopScrollEdgeEffect(Platform.OS, Platform.Version);
|
||||
const IOS_SEARCH_FILL_DARK = "rgba(118, 118, 128, 0.24)";
|
||||
const IOS_SEARCH_FILL_LIGHT = "rgba(118, 118, 128, 0.12)";
|
||||
const SIDEBAR_HEADER_WASH_OPACITY = {
|
||||
@@ -597,7 +599,7 @@ export function ThreadNavigationSidebar(props: {
|
||||
bottom: "hidden",
|
||||
left: "hidden",
|
||||
right: "hidden",
|
||||
top: "automatic",
|
||||
top: TOP_SCROLL_EDGE_EFFECT,
|
||||
}}
|
||||
style={[styles.container, { backgroundColor }]}
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user