mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-07-07 13:02:52 +01:00
fix(tv): only defer option-modal selection when it navigates
The close-first + runAfterInteractions change (needed so the in-player audio switch's replacePlayer isn't swallowed by the modal route) also runs for every other tv-option-modal caller — detail-page audio, library filters, settings — whose onSelect only updates state. Deferring those until after dismissal re-renders the page after focus returns and yanks TV focus, leaving navigation stuck. Gate the deferral behind deferApplyUntilDismissed (set only by the in-player audio caller); everyone else applies before closing, as before.
This commit is contained in:
@@ -12,6 +12,7 @@ interface ShowOptionsParams<T> {
|
||||
onSelect: (value: T) => void;
|
||||
cardWidth?: number;
|
||||
cardHeight?: number;
|
||||
deferApplyUntilDismissed?: boolean;
|
||||
}
|
||||
|
||||
export const useTVOptionModal = () => {
|
||||
@@ -26,6 +27,7 @@ export const useTVOptionModal = () => {
|
||||
onSelect: params.onSelect,
|
||||
cardWidth: params.cardWidth,
|
||||
cardHeight: params.cardHeight,
|
||||
deferApplyUntilDismissed: params.deferApplyUntilDismissed,
|
||||
});
|
||||
router.push("/(auth)/tv-option-modal");
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user