@@ -4,7 +4,6 @@ import Constants from "expo-constants";
44import * as Notifications from "expo-notifications" ;
55import { useNavigation } from "@react-navigation/native" ;
66import { NativeStackScreenOptions } from "../../native/StackHeader" ;
7- import { resolveMobileAutoSettlePreferences } from "../../persistence/mobile-preferences" ;
87import { SymbolView } from "../../components/AppSymbol" ;
98import * as Effect from "effect/Effect" ;
109import { AsyncResult } from "effect/unstable/reactivity" ;
@@ -46,7 +45,6 @@ import { useSavedRemoteConnections } from "../../state/use-remote-environment-re
4645import { SettingsRow } from "./components/SettingsRow" ;
4746import { SettingsSection } from "./components/SettingsSection" ;
4847import { SettingsSwitchRow } from "./components/SettingsSwitchRow" ;
49- import { mobileAutoSettleModeLabel } from "./SettingsAutoSettleRouteScreen" ;
5048import { resolveAgentAwarenessPlatformPresentation } from "./SettingsRouteScreen.logic" ;
5149
5250type NotificationStatus = "checking" | "enabled" | "disabled" | "unsupported" ;
@@ -530,18 +528,19 @@ function ConfiguredSettingsRouteScreen() {
530528
531529function GeneralSettingsSection ( ) {
532530 const preferencesResult = useAtomValue ( mobilePreferencesAtom ) ;
533- const autoSettlePreferences = resolveMobileAutoSettlePreferences (
534- AsyncResult . isSuccess ( preferencesResult ) ? preferencesResult . value : { } ,
535- ) ;
531+ const savePreferences = useAtomSet ( updateMobilePreferencesAtom ) ;
532+ const autoSettleOnMerge =
533+ ! AsyncResult . isSuccess ( preferencesResult ) ||
534+ preferencesResult . value . autoSettleOnMerge !== false ;
536535
537536 return (
538537 < SettingsSection title = "General" >
539538 < SettingsRow icon = "folder" label = "Project Grouping" target = "SettingsProjectGrouping" />
540- < SettingsRow
539+ < SettingsSwitchRow
541540 icon = "arrow.triangle.branch"
542- label = "Thread Settling "
543- value = { mobileAutoSettleModeLabel ( autoSettlePreferences . autoSettleMode ) }
544- target = "SettingsAutoSettle"
541+ label = "Auto-settle merged threads "
542+ value = { autoSettleOnMerge }
543+ onValueChange = { ( value ) => savePreferences ( { autoSettleOnMerge : value } ) }
545544 />
546545 < SettingsRow icon = "chart.bar.xaxis" label = "Usage" target = "SettingsUsage" />
547546 </ SettingsSection >
0 commit comments