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