Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
4 changes: 2 additions & 2 deletions apps/mobile/src/features/workspace/floating-workspace-tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export function floatingTabsMetrics(
fabSize: number,
paneWidth?: number,
fillWidth = false,
composeVisible = true,
) {
const unit = Math.max(1, scale);
const height = fabSize;
Expand All @@ -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,
Expand Down
Loading