@@ -66,6 +66,8 @@ import { SymbolView, type AppSymbolName } from "../../components/ui/AppSymbol";
6666import { HeaderHeightContext } from "@react-navigation/elements" ;
6767import { useFocusEffect , useNavigation } from "@react-navigation/native" ;
6868import { useNativeWorkspaceColumnsSupported } from "../../native/NativeWorkspaceColumns" ;
69+ import { useDeviceType } from "../../native/native-layout-metrics" ;
70+ import { isDuoDevice } from "../../lib/device-type" ;
6971import {
7072 createContext ,
7173 memo ,
@@ -998,7 +1000,7 @@ function renderFeedEntry(
9981000 readonly reviewCommentColors : ReviewCommentColors ;
9991001 readonly reviewCommentBubbleWidth : number ;
10001002 readonly themeAppearance : "light" | "dark" ;
1001- readonly usesNativeWorkspaceColumns : boolean ;
1003+ readonly duoColumns : boolean ;
10021004 readonly userBubbleMaxWidth : number ;
10031005 readonly markdownContentWidth : number ;
10041006 readonly contentWidth : number ;
@@ -1189,19 +1191,11 @@ function renderFeedEntry(
11891191 className = "min-w-0 gap-2 rounded-[20px] px-3.5 py-2.5"
11901192 style = { {
11911193 backgroundColor : userBubbleColor ,
1192- maxWidth :
1193- props . usesNativeWorkspaceColumns && Platform . OS === "ios" && ! Platform . isPad
1194- ? "85%"
1195- : props . userBubbleMaxWidth ,
1194+ maxWidth : props . duoColumns ? "85%" : props . userBubbleMaxWidth ,
11961195 ...( hasReviewCommentContext
11971196 ? { width : props . reviewCommentBubbleWidth }
11981197 : hasWideBlock
1199- ? {
1200- width :
1201- props . usesNativeWorkspaceColumns && Platform . OS === "ios" && ! Platform . isPad
1202- ? "85%"
1203- : props . userBubbleMaxWidth ,
1204- }
1198+ ? { width : props . duoColumns ? "85%" : props . userBubbleMaxWidth }
12051199 : null ) ,
12061200 } }
12071201 >
@@ -1667,7 +1661,8 @@ function ThreadFeedPlaceholder(props: {
16671661}
16681662
16691663export const ThreadFeed = memo ( function ThreadFeed ( props : ThreadFeedProps ) {
1670- const usesNativeWorkspaceColumns = useNativeWorkspaceColumnsSupported ( ) ;
1664+ const deviceType = useDeviceType ( ) ;
1665+ const duoColumns = useNativeWorkspaceColumnsSupported ( ) && isDuoDevice ( deviceType ) ;
16711666 const openPullRequest = useOpenPullRequest ( ) ;
16721667 const navigation = useNavigation ( ) ;
16731668 const { themeAppearance } = useAppearancePreferences ( ) ;
@@ -2474,7 +2469,7 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
24742469 reviewCommentColors,
24752470 reviewCommentBubbleWidth,
24762471 themeAppearance,
2477- usesNativeWorkspaceColumns ,
2472+ duoColumns ,
24782473 userBubbleMaxWidth,
24792474 markdownContentWidth,
24802475 contentWidth,
@@ -2513,7 +2508,7 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
25132508 reviewCommentColors ,
25142509 reviewCommentBubbleWidth ,
25152510 themeAppearance ,
2516- usesNativeWorkspaceColumns ,
2511+ duoColumns ,
25172512 userBubbleMaxWidth ,
25182513 markdownContentWidth ,
25192514 contentWidth ,
@@ -2568,10 +2563,7 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
25682563 // Horizontal Duo reservations are already included in the row padding.
25692564 contentInsetAdjustmentBehavior = {
25702565 usesNativeAutomaticInsets
2571- ? usesNativeWorkspaceColumns &&
2572- Platform . OS === "ios" &&
2573- ! Platform . isPad &&
2574- props . layoutVariant === "split"
2566+ ? duoColumns && props . layoutVariant === "split"
25752567 ? "scrollableAxes"
25762568 : "automatic"
25772569 : "never"
0 commit comments