Skip to content
TypeScript

fix(mobile): restore the reserved compose space on Android (#28819)

Alex965291ec6767
diff --git a/apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.android.tsx b/apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.android.tsx
index f9f2e57bc3e..247f7e00a5b 100644
--- a/apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.android.tsx
+++ b/apps/mobile/src/features/workspace/AndroidWorkspaceNavigation.android.tsx
@@ -99,20 +99,7 @@ export function AndroidWorkspaceNavigation(props: {
const barWidth =
props.paneWidth ??
window.width - (Math.max(insets.left, FLOATING_TABS.edge) - FLOATING_TABS.edge);
- // A phone draws compose on the Chats list only; the split sidebar draws it on every tab
- // except the Settings and Usage pages.
- const composeBesideBar =
- props.paneWidth === undefined
- ? selectedTab === "threads"
- : selectedTab !== "settings" && selectedTab !== "usage";
- const metrics = floatingTabsMetrics(
- tabs.length,
- scale,
- fabSize,
- barWidth,
- props.fillWidth,
- composeBesideBar && connectionState.hasConnections,
- );
+ const metrics = floatingTabsMetrics(tabs.length, scale, fabSize, barWidth, props.fillWidth);
if (!rail && keyboardVisible) return null;
return (
diff --git a/apps/mobile/src/features/workspace/floating-workspace-tabs.ts b/apps/mobile/src/features/workspace/floating-workspace-tabs.ts
index d28524e656b..bb24d3478fd 100644
--- a/apps/mobile/src/features/workspace/floating-workspace-tabs.ts
+++ b/apps/mobile/src/features/workspace/floating-workspace-tabs.ts
@@ -7,7 +7,6 @@ export function floatingTabsMetrics(
fabSize: number,
paneWidth?: number,
fillWidth = false,
- composeVisible = true,
) {
const unit = Math.max(1, scale);
const height = fabSize;
@@ -17,10 +16,11 @@ export function floatingTabsMetrics(
const room =
paneWidth === undefined
? count * 60 * unit
- : sharesRow && composeVisible
+ : sharesRow
? paneWidth - beside
: paneWidth - 2 * FLOATING_TABS.edge;
return {
+ // Reserve the compose slot even while its button is hidden.
pill: Math.max(0, fillWidth ? room : Math.min(count * 72 * unit, room)),
height,
row,