Skip to content

Commit c5cf7c5

Browse files
committed
fix(mobile): show Android build channel in Threads
1 parent cb11a71 commit c5cf7c5

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎apps/mobile/src/features/home/HomeHeader.tsx‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { EnvironmentId, SidebarThreadSortOrder } from "@t3tools/contracts";
22
import type { MenuAction } from "@react-native-menu/menu";
3+
import Constants from "expo-constants";
34
import { NativeHeaderToolbar, NativeStackScreenOptions } from "../../native/StackHeader";
45
import { useCallback, useMemo, useRef } from "react";
56
import { Platform, Pressable, Text as RNText, TextInput, View } from "react-native";
@@ -9,6 +10,8 @@ import { useSafeAreaInsets } from "react-native-safe-area-context";
910
import { ControlPillMenu } from "../../components/ControlPill";
1011
import { SymbolView } from "../../components/AppSymbol";
1112
import { T3Wordmark } from "../../components/T3Wordmark";
13+
import { HOME_HORIZONTAL_INSET } from "../../lib/layoutMetrics";
14+
import { resolveMobileStageLabel } from "../../lib/mobileBranding";
1215
import { useThemeColor } from "../../lib/useThemeColor";
1316
import { useThreadListV2Enabled } from "../threads/use-thread-list-v2-enabled";
1417
import { useHardwareKeyboardCommand } from "../keyboard/hardwareKeyboardCommands";
@@ -64,6 +67,7 @@ function AndroidHomeHeader(props: HomeHeaderProps) {
6467
const insets = useSafeAreaInsets();
6568
const iconColor = useThemeColor("--color-icon");
6669
const mutedColor = useThemeColor("--color-foreground-muted");
70+
const stageLabel = resolveMobileStageLabel(Constants.expoConfig?.extra?.appVariant);
6771
// Thread List v2 lays the list out in fixed creation order, so the
6872
// sort/group filter controls would be silently ignored — hide them and
6973
// key the "customized" icon state off the environment filter alone.
@@ -195,8 +199,9 @@ function AndroidHomeHeader(props: HomeHeaderProps) {
195199
<>
196200
<NativeStackScreenOptions options={{ headerShown: false }} />
197201
<View
198-
className="border-b border-header-border bg-header px-4 pb-3"
202+
className="border-b border-header-border bg-header pb-3"
199203
style={{
204+
paddingHorizontal: HOME_HORIZONTAL_INSET,
200205
paddingTop: Math.max(insets.top, 12),
201206
}}
202207
>
@@ -210,7 +215,7 @@ function AndroidHomeHeader(props: HomeHeaderProps) {
210215
</RNText>
211216
<View className="rounded-full bg-subtle px-2 py-0.75">
212217
<RNText className="text-[11px] font-t3-bold tracking-[1.1px] text-foreground-muted uppercase">
213-
Alpha
218+
{stageLabel}
214219
</RNText>
215220
</View>
216221
</View>

0 commit comments

Comments
 (0)