diff --git a/apps/mobile/src/features/threads/thread-list-v2-items.tsx b/apps/mobile/src/features/threads/thread-list-v2-items.tsx index 6c270a0144ccf..8d3fee6ce0a06 100644 --- a/apps/mobile/src/features/threads/thread-list-v2-items.tsx +++ b/apps/mobile/src/features/threads/thread-list-v2-items.tsx @@ -65,15 +65,10 @@ import { import { QueuedMessageIcon } from "./queued-message-icon"; import { shouldRecedeThreadRow } from "./thread-row-emphasis"; import { ThreadSearchMatchExcerpt } from "./thread-search-match"; +import { useScaledTextRole } from "../settings/appearance/useScaledTextRole"; import { PullRequestGlyph } from "../pull-requests/pullRequestGlyphs"; import { pullRequestStatus } from "../pull-requests/pullRequestStatus"; -const TITLE_FAVICON_SIZE = 15; -// Centers the favicon on the first line of the text-base title. -const TITLE_FAVICON_OFFSET = 4; -// Lines below the title start where the title text does. -const TITLE_TEXT_INSET = TITLE_FAVICON_SIZE + 8; - interface StatusLabel { readonly label: string; readonly icon: AppSymbolName; @@ -602,7 +597,12 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: { readonly searchQuery?: string; readonly simultaneousSwipeGesture?: ComponentProps["simultaneousWith"]; }) { - const { width: windowWidth } = useWindowDimensions(); + const { width: windowWidth, fontScale } = useWindowDimensions(); + const titleTypography = useScaledTextRole("body"); + const metadataTypography = useScaledTextRole("label"); + const projectIconSize = titleTypography.fontSize * 1.25 * fontScale; + const machineIconSize = metadataTypography.fontSize * fontScale; + const titleLineHeight = titleTypography.lineHeight * fontScale; const { thread, variant, @@ -1001,17 +1001,17 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: { ? `Opens the thread. Swipe left to ${primaryAction.label.toLowerCase()}.` : `Opens the thread. Swipe left for ${primaryAction.label.toLowerCase()} and snooze actions.`; - const titleTextInset = props.project ? TITLE_TEXT_INSET : 0; + const titleTextInset = props.project ? projectIconSize + 8 : 0; const cardContent = ( <> {props.project ? ( - + @@ -1029,7 +1029,7 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: { > {thread.title} - + {props.hasQueuedMessages ? : null} {pinnedRow ? (