This commit is contained in:
Linrador 2026-03-19 21:51:17 +01:00
parent c1669b4eec
commit 54347e61d3
5 changed files with 0 additions and 32 deletions

View File

@ -325,9 +325,6 @@ export default function FinishedDownloads({
const [teaserKey, setTeaserKey] = React.useState<string | null>(null) const [teaserKey, setTeaserKey] = React.useState<string | null>(null)
const [hoverTeaserKey, setHoverTeaserKey] = React.useState<string | null>(null) const [hoverTeaserKey, setHoverTeaserKey] = React.useState<string | null>(null)
const [listPreviewActivationNonce, setListPreviewActivationNonce] = React.useState(0)
const lastListPreviewKeyRef = React.useRef<string | null>(null)
const teaserIORef = React.useRef<IntersectionObserver | null>(null) const teaserIORef = React.useRef<IntersectionObserver | null>(null)
const elToKeyRef = React.useRef<WeakMap<Element, string>>(new WeakMap()) const elToKeyRef = React.useRef<WeakMap<Element, string>>(new WeakMap())
@ -1922,24 +1919,6 @@ export default function FinishedDownloads({
if (page > totalPages) onPageChange(totalPages) if (page > totalPages) onPageChange(totalPages)
}, [globalFilterActive, visibleRows.length, page, pageSize, onPageChange]) }, [globalFilterActive, visibleRows.length, page, pageSize, onPageChange])
useEffect(() => {
if (view !== 'table' && view !== 'gallery') {
lastListPreviewKeyRef.current = null
return
}
const nextKey = teaserState.activeKey ?? teaserState.hoverKey ?? null
if (!nextKey) {
lastListPreviewKeyRef.current = null
return
}
if (lastListPreviewKeyRef.current === nextKey) return
lastListPreviewKeyRef.current = nextKey
setListPreviewActivationNonce((n) => n + 1)
}, [view, teaserState.activeKey, teaserState.hoverKey])
// 🖱️ Desktop: Teaser nur bei Hover (Settings: 'hover' = Standard). Mobile: weiterhin Viewport-Fokus (Effect darunter) // 🖱️ Desktop: Teaser nur bei Hover (Settings: 'hover' = Standard). Mobile: weiterhin Viewport-Fokus (Effect darunter)
useEffect(() => { useEffect(() => {
const active = const active =
@ -2554,7 +2533,6 @@ export default function FinishedDownloads({
keepVideo={keepVideo} keepVideo={keepVideo}
postworkByFile={postworkByFile} postworkByFile={postworkByFile}
forcePreviewMuted={forcePreviewMuted} forcePreviewMuted={forcePreviewMuted}
previewActivationNonce={listPreviewActivationNonce}
/> />
)} )}
@ -2595,7 +2573,6 @@ export default function FinishedDownloads({
onHoverPreviewKeyChange={setHoverTeaserKey} onHoverPreviewKeyChange={setHoverTeaserKey}
postworkByFile={postworkByFile} postworkByFile={postworkByFile}
forcePreviewMuted={forcePreviewMuted} forcePreviewMuted={forcePreviewMuted}
previewActivationNonce={listPreviewActivationNonce}
/> />
)} )}

View File

@ -722,7 +722,6 @@ export default function FinishedDownloadsCardsView({
) => { ) => {
const k = keyFor(j) const k = keyFor(j)
const isMobileTopCard = Boolean(isSmall && opts?.mobileStackTopOnlyVideo)
const realInlineActive = inlinePlay?.key === k const realInlineActive = inlinePlay?.key === k
const inlineActive = opts?.disableInline ? false : realInlineActive const inlineActive = opts?.disableInline ? false : realInlineActive

View File

@ -95,7 +95,6 @@ type Props = {
onAddToDownloads?: (job: RecordJob) => void | Promise<boolean> onAddToDownloads?: (job: RecordJob) => void | Promise<boolean>
forcePreviewMuted?: boolean forcePreviewMuted?: boolean
previewActivationNonce: number
} }
function firstNonEmptyString(...values: unknown[]): string | undefined { function firstNonEmptyString(...values: unknown[]): string | undefined {
@ -202,7 +201,6 @@ export default function FinishedDownloadsGalleryView({
onSplit, onSplit,
onAddToDownloads, onAddToDownloads,
forcePreviewMuted, forcePreviewMuted,
previewActivationNonce,
}: Props) { }: Props) {
// ✅ Teaser-Observer nur aktiv, wenn Preview überhaupt "laufen" soll // ✅ Teaser-Observer nur aktiv, wenn Preview überhaupt "laufen" soll
const observeTeasers = shouldObserveTeasers(teaserState.mode) const observeTeasers = shouldObserveTeasers(teaserState.mode)
@ -545,7 +543,6 @@ export default function FinishedDownloadsGalleryView({
scrubProgressRatio={scrubProgressRatio} scrubProgressRatio={scrubProgressRatio}
preferScrubProgress={typeof activeScrubIndex === 'number'} preferScrubProgress={typeof activeScrubIndex === 'number'}
forceActive={isPreviewActive} forceActive={isPreviewActive}
activationNonce={isPreviewActive ? previewActivationNonce : 0}
teaserPreloadEnabled teaserPreloadEnabled
/> />
</div> </div>

View File

@ -93,7 +93,6 @@ type Props = {
deleteVideo: (job: RecordJob) => Promise<boolean> deleteVideo: (job: RecordJob) => Promise<boolean>
keepVideo: (job: RecordJob) => Promise<boolean> keepVideo: (job: RecordJob) => Promise<boolean>
forcePreviewMuted?: boolean forcePreviewMuted?: boolean
previewActivationNonce: number
} }
export default function FinishedDownloadsTableView({ export default function FinishedDownloadsTableView({
@ -143,7 +142,6 @@ export default function FinishedDownloadsTableView({
deleteVideo, deleteVideo,
keepVideo, keepVideo,
forcePreviewMuted, forcePreviewMuted,
previewActivationNonce,
}: Props) { }: Props) {
const [sort, setSort] = React.useState<SortState>(null) const [sort, setSort] = React.useState<SortState>(null)
@ -296,7 +294,6 @@ export default function FinishedDownloadsTableView({
animatedTrigger="always" animatedTrigger="always"
assetNonce={assetNonce} assetNonce={assetNonce}
forceActive={isPreviewActive} forceActive={isPreviewActive}
activationNonce={isPreviewActive ? previewActivationNonce : 0}
teaserPreloadEnabled teaserPreloadEnabled
/> />
@ -553,7 +550,6 @@ export default function FinishedDownloadsTableView({
parseTags, parseTags,
runtimeSecondsForSort, runtimeSecondsForSort,
forcePreviewMuted, forcePreviewMuted,
previewActivationNonce,
]) ])
const sortStateToMode = React.useCallback((s: SortState): SortMode => { const sortStateToMode = React.useCallback((s: SortState): SortMode => {

View File

@ -389,7 +389,6 @@ export default function FinishedVideoPreview({
const inlineRef = useRef<HTMLVideoElement | null>(null) const inlineRef = useRef<HTMLVideoElement | null>(null)
const teaserMp4Ref = useRef<HTMLVideoElement | null>(null) const teaserMp4Ref = useRef<HTMLVideoElement | null>(null)
const lastTeaserRefStateRef = useRef<'attached' | 'detached' | null>(null)
const clipsRef = useRef<HTMLVideoElement | null>(null) const clipsRef = useRef<HTMLVideoElement | null>(null)
const playTeaserFromGesture = useCallback(() => { const playTeaserFromGesture = useCallback(() => {