updated
This commit is contained in:
parent
c1669b4eec
commit
54347e61d3
@ -325,9 +325,6 @@ export default function FinishedDownloads({
|
||||
const [teaserKey, setTeaserKey] = 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 elToKeyRef = React.useRef<WeakMap<Element, string>>(new WeakMap())
|
||||
|
||||
@ -1922,24 +1919,6 @@ export default function FinishedDownloads({
|
||||
if (page > totalPages) onPageChange(totalPages)
|
||||
}, [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)
|
||||
useEffect(() => {
|
||||
const active =
|
||||
@ -2554,7 +2533,6 @@ export default function FinishedDownloads({
|
||||
keepVideo={keepVideo}
|
||||
postworkByFile={postworkByFile}
|
||||
forcePreviewMuted={forcePreviewMuted}
|
||||
previewActivationNonce={listPreviewActivationNonce}
|
||||
/>
|
||||
)}
|
||||
|
||||
@ -2595,7 +2573,6 @@ export default function FinishedDownloads({
|
||||
onHoverPreviewKeyChange={setHoverTeaserKey}
|
||||
postworkByFile={postworkByFile}
|
||||
forcePreviewMuted={forcePreviewMuted}
|
||||
previewActivationNonce={listPreviewActivationNonce}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
||||
@ -722,7 +722,6 @@ export default function FinishedDownloadsCardsView({
|
||||
) => {
|
||||
const k = keyFor(j)
|
||||
|
||||
const isMobileTopCard = Boolean(isSmall && opts?.mobileStackTopOnlyVideo)
|
||||
const realInlineActive = inlinePlay?.key === k
|
||||
const inlineActive = opts?.disableInline ? false : realInlineActive
|
||||
|
||||
|
||||
@ -95,7 +95,6 @@ type Props = {
|
||||
onAddToDownloads?: (job: RecordJob) => void | Promise<boolean>
|
||||
|
||||
forcePreviewMuted?: boolean
|
||||
previewActivationNonce: number
|
||||
}
|
||||
|
||||
function firstNonEmptyString(...values: unknown[]): string | undefined {
|
||||
@ -202,7 +201,6 @@ export default function FinishedDownloadsGalleryView({
|
||||
onSplit,
|
||||
onAddToDownloads,
|
||||
forcePreviewMuted,
|
||||
previewActivationNonce,
|
||||
}: Props) {
|
||||
// ✅ Teaser-Observer nur aktiv, wenn Preview überhaupt "laufen" soll
|
||||
const observeTeasers = shouldObserveTeasers(teaserState.mode)
|
||||
@ -545,7 +543,6 @@ export default function FinishedDownloadsGalleryView({
|
||||
scrubProgressRatio={scrubProgressRatio}
|
||||
preferScrubProgress={typeof activeScrubIndex === 'number'}
|
||||
forceActive={isPreviewActive}
|
||||
activationNonce={isPreviewActive ? previewActivationNonce : 0}
|
||||
teaserPreloadEnabled
|
||||
/>
|
||||
</div>
|
||||
|
||||
@ -93,7 +93,6 @@ type Props = {
|
||||
deleteVideo: (job: RecordJob) => Promise<boolean>
|
||||
keepVideo: (job: RecordJob) => Promise<boolean>
|
||||
forcePreviewMuted?: boolean
|
||||
previewActivationNonce: number
|
||||
}
|
||||
|
||||
export default function FinishedDownloadsTableView({
|
||||
@ -143,7 +142,6 @@ export default function FinishedDownloadsTableView({
|
||||
deleteVideo,
|
||||
keepVideo,
|
||||
forcePreviewMuted,
|
||||
previewActivationNonce,
|
||||
}: Props) {
|
||||
const [sort, setSort] = React.useState<SortState>(null)
|
||||
|
||||
@ -296,7 +294,6 @@ export default function FinishedDownloadsTableView({
|
||||
animatedTrigger="always"
|
||||
assetNonce={assetNonce}
|
||||
forceActive={isPreviewActive}
|
||||
activationNonce={isPreviewActive ? previewActivationNonce : 0}
|
||||
teaserPreloadEnabled
|
||||
/>
|
||||
|
||||
@ -553,7 +550,6 @@ export default function FinishedDownloadsTableView({
|
||||
parseTags,
|
||||
runtimeSecondsForSort,
|
||||
forcePreviewMuted,
|
||||
previewActivationNonce,
|
||||
])
|
||||
|
||||
const sortStateToMode = React.useCallback((s: SortState): SortMode => {
|
||||
|
||||
@ -389,7 +389,6 @@ export default function FinishedVideoPreview({
|
||||
|
||||
const inlineRef = useRef<HTMLVideoElement | null>(null)
|
||||
const teaserMp4Ref = useRef<HTMLVideoElement | null>(null)
|
||||
const lastTeaserRefStateRef = useRef<'attached' | 'detached' | null>(null)
|
||||
const clipsRef = useRef<HTMLVideoElement | null>(null)
|
||||
|
||||
const playTeaserFromGesture = useCallback(() => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user