Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions apps/mobile/app/project/[projectId]/[sessionId]/diff.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useCallback, useMemo } from "react"
import { FlatList, View } from "react-native"
import { FlatList, ScrollView, View } from "react-native"
import { useLocalSearchParams, useRouter } from "expo-router"
import { useSafeAreaInsets } from "react-native-safe-area-context"
import { useColorScheme } from "nativewind"
Expand Down Expand Up @@ -56,26 +56,32 @@ export default function DiffPage() {

return (
<View style={{ backgroundColor: bg }} className="flex-row">
<View style={{ minWidth: 36, paddingHorizontal: 4 }} className="items-end border-r border-accent/30">
<View style={{ minWidth: 36, paddingHorizontal: 4, flexShrink: 0 }} className="items-end border-r border-accent/30">
<Text className="text-xs font-mono leading-5" style={{ color: colors.lineNumColor }}>
{oldNum ?? ""}
</Text>
</View>
<View style={{ minWidth: 36, paddingHorizontal: 4 }} className="items-end border-r border-accent/30">
<View style={{ minWidth: 36, paddingHorizontal: 4, flexShrink: 0 }} className="items-end border-r border-accent/30">
<Text className="text-xs font-mono leading-5" style={{ color: colors.lineNumColor }}>
{newNum ?? ""}
</Text>
</View>
<View style={{ minWidth: 16, paddingHorizontal: 4 }}>
<View style={{ minWidth: 16, paddingHorizontal: 4, flexShrink: 0 }}>
<Text className="text-xs font-mono leading-5" style={{ color: textColor }}>
{prefix}
</Text>
</View>
<View style={{ paddingHorizontal: 4, flexShrink: 0 }}>
<ScrollView
horizontal
showsHorizontalScrollIndicator={false}
nestedScrollEnabled
style={{ flex: 1 }}
contentContainerStyle={{ paddingHorizontal: 4 }}
>
<Text className="text-xs font-mono leading-5" style={{ color: textColor }}>
{line.content || " "}
</Text>
</View>
</ScrollView>
</View>
)
}, [colors])
Expand Down
Loading