mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-02 12:08:37 +01:00
fix(player): keep controls visible while settings popover is open
Re-enabling the auto-hide timeout (previous commit) let it fire while the player settings popover was open, dismissing it mid-interaction — most visibly on iOS, where the popover lives inside the controls and closes when they fade out. Surface the popover's open state up through DropdownView -> HeaderControls -> Controls and pass it as useControlsTimeout's `disabled` flag, so the auto-hide pauses while the menu is open and re-arms once it closes. iOS reports open/close via the SwiftUI Popover binding; Android's menu is a separate global bottom-sheet modal and is unaffected by controls hiding.
This commit is contained in:
@@ -37,6 +37,9 @@ interface HeaderControlsProps {
|
||||
// Technical info props
|
||||
showTechnicalInfo?: boolean;
|
||||
onToggleTechnicalInfo?: () => void;
|
||||
// Notifies the parent when the settings popover opens/closes so it can pause
|
||||
// the controls auto-hide while the menu is up.
|
||||
onSettingsMenuOpenChange?: (open: boolean) => void;
|
||||
}
|
||||
|
||||
export const HeaderControls: FC<HeaderControlsProps> = ({
|
||||
@@ -57,6 +60,7 @@ export const HeaderControls: FC<HeaderControlsProps> = ({
|
||||
setPlaybackSpeed,
|
||||
showTechnicalInfo = false,
|
||||
onToggleTechnicalInfo,
|
||||
onSettingsMenuOpenChange,
|
||||
}) => {
|
||||
const { settings } = useSettings();
|
||||
const router = useRouter();
|
||||
@@ -117,6 +121,7 @@ export const HeaderControls: FC<HeaderControlsProps> = ({
|
||||
setPlaybackSpeed={setPlaybackSpeed}
|
||||
showTechnicalInfo={showTechnicalInfo}
|
||||
onToggleTechnicalInfo={onToggleTechnicalInfo}
|
||||
onOpenChange={onSettingsMenuOpenChange}
|
||||
/>
|
||||
</View>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user