fix(Library): continue watching mode was broken

This commit is contained in:
Tim 2025-02-25 10:36:17 +01:00
parent c63d01c8e4
commit 0572ee3371

View file

@ -59,7 +59,7 @@ const Library = ({ model, urlParams, queryParams }) => {
}, [hasNextPage, loadNextPage]);
const onScroll = useOnScrollToBottom(onScrollToBottom, SCROLL_TO_BOTTOM_TRESHOLD);
React.useLayoutEffect(() => {
if (profile.auth !== null && library.selected && library.selected.request.page === 1 && library.catalog.length !== 0) {
if (scrollContainerRef.current !== null && library.selected && library.selected.request.page === 1 && library.catalog.length !== 0) {
scrollContainerRef.current.scrollTop = 0;
}
}, [profile.auth, library.selected]);
@ -73,7 +73,6 @@ const Library = ({ model, urlParams, queryParams }) => {
<Chips {...sortChips} className={styles['select-input-container']} />
</div>
{
model === 'library' ?
library.selected === null ?
<DelayedRenderer delay={500}>
<div className={styles['message-container']}>
@ -97,11 +96,12 @@ const Library = ({ model, urlParams, queryParams }) => {
</div>
:
<div ref={scrollContainerRef} className={classnames(styles['meta-items-container'], 'animation-fade-in')} onScroll={onScroll}>
{library.catalog.map((libItem, index) => (
{
library.catalog.map((libItem, index) => (
<LibItem {...libItem} notifications={notifications} removable={model === 'library'} key={index} />
))}
))
}
</div>
: null
}
</div>
: