Files
orca/mobile/src/source-control/mobile-source-control-sections.ts
T
Kelvin Amoaba 9d2e441947 fix(mobile): compare branches and show diffs with desktop's base-ref and whitespace settings (#34038)
* fix(mobile): compare branches and show diffs with desktop's base-ref and whitespace settings

Base-ref resolution moves to src/shared and the host publishes the compare-against-upstream
and show-whitespace settings, so the phone's branch compare and diffs match desktop.

* fix(mobile): use the upstream compare policy on the review screen and rebuild diffs when whitespace changes

* fix(mobile): reread Source Control settings on Refresh and restart diffs loading under the old whitespace setting

* test(mobile): cover diffs dropped when desktop's whitespace setting arrives

* refactor(mobile): share one Source Control settings read per host across screens
2026-10-27 05:29:46 +00:00

11 lines
474 B
TypeScript

import { useMemo } from 'react'
import type { SourceControlGroupOrder } from '../../../src/shared/ui-chrome-types'
import { buildMobileSourceControlSections, type MobileGitStatusEntry } from './mobile-git-status'
export function useMobileSourceControlSections<TEntry extends MobileGitStatusEntry>(
entries: readonly TEntry[],
groupOrder: SourceControlGroupOrder
) {
return useMemo(() => buildMobileSourceControlSections(entries, groupOrder), [entries, groupOrder])
}