Fix for channel continuation.

This commit is contained in:
FireMasterK 2021-03-29 12:12:53 +05:30
parent ad35531388
commit 41b0fb8b96
No known key found for this signature in database
GPG key ID: 8DFF5DD33E93DB58

View file

@ -75,7 +75,13 @@ export default {
.then(() => (document.title = this.channel.name + " - Piped"));
},
handleScroll() {
if (this.loading || !this.channel || !this.channel.nextpage) return;
if (
this.loading ||
!this.channel ||
!this.channel.nextpage ||
!this.channel.nextid
)
return;
if (
window.innerHeight + window.scrollY >=
document.body.offsetHeight - window.innerHeight
@ -86,7 +92,9 @@ export default {
"/nextpage/channels/" +
this.$route.params.channelId +
"?url=" +
encodeURIComponent(this.channel.nextpage)
encodeURIComponent(this.channel.nextpage) +
"&id=" +
encodeURIComponent(this.channel.nextid)
).then(json => {
this.channel.relatedStreams.concat(json.relatedStreams);
this.channel.nextpage = json.nextpage;