Fix agent preferences sheet restoring tab switcher on close

Use stackBehavior="replace" on the preferences BottomSheetModal so it
dismisses the tab switcher combobox instead of minimizing it, preventing
the provider from auto-restoring the tab switcher when preferences closes.
This commit is contained in:
Mohamed Boudra
2026-03-21 20:46:44 +07:00
parent f6579dbeb4
commit 3b5daa1451
2 changed files with 9 additions and 2 deletions
@@ -101,6 +101,7 @@ export interface AdaptiveModalSheetProps {
onClose: () => void;
children: ReactNode;
snapPoints?: string[];
stackBehavior?: "push" | "switch" | "replace";
testID?: string;
}
@@ -110,6 +111,7 @@ export function AdaptiveModalSheet({
onClose,
children,
snapPoints,
stackBehavior,
testID,
}: AdaptiveModalSheetProps) {
const { theme } = useUnistyles();
@@ -159,6 +161,7 @@ export function AdaptiveModalSheet({
onChange={handleSheetChange}
backdropComponent={renderBackdrop}
enablePanDownToClose
stackBehavior={stackBehavior}
backgroundComponent={SheetBackground}
handleIndicatorStyle={styles.bottomSheetHandle}
keyboardBehavior="extend"