forked from platypush/platypush
[YouTube UI] Fixed infinite scroll for channels.
This commit is contained in:
parent
81fb1a47c3
commit
972f9dffb9
1 changed files with 6 additions and 4 deletions
|
@ -1,8 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="media-youtube-channel" @scroll="onScroll">
|
<div class="media-youtube-channel">
|
||||||
<Loading v-if="loading" />
|
<Loading v-if="loading" />
|
||||||
|
|
||||||
<div class="channel" @scroll="onScroll" v-else-if="channel">
|
<div class="channel" v-else-if="channel">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="banner">
|
<div class="banner">
|
||||||
<img :src="channel.banner" v-if="channel?.banner?.length" />
|
<img :src="channel.banner" v-if="channel?.banner?.length" />
|
||||||
|
@ -45,8 +45,10 @@
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
:selected-result="selectedResult"
|
:selected-result="selectedResult"
|
||||||
ref="results"
|
ref="results"
|
||||||
|
@play="$emit('play', $event)"
|
||||||
|
@scroll-end="loadNextPage"
|
||||||
@select="selectedResult = $event"
|
@select="selectedResult = $event"
|
||||||
@play="$emit('play', $event)" />
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -135,7 +137,7 @@ export default {
|
||||||
if (!el)
|
if (!el)
|
||||||
return
|
return
|
||||||
|
|
||||||
const bottom = (el.scrollHeight - el.scrollTop) <= el.clientHeight + 150
|
const bottom = (el.scrollHeight - el.scrollTop) <= el.clientHeight + 100
|
||||||
if (!bottom)
|
if (!bottom)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue