mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
commit
b41800cad3
1 changed files with 3 additions and 1 deletions
|
@ -142,7 +142,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleScroll() {
|
handleScroll() {
|
||||||
if (this.loading || !this.channel || !this.channel.nextpage) return;
|
if (this.loading || !this.channel) return;
|
||||||
if (window.innerHeight + window.scrollY >= document.body.offsetHeight - window.innerHeight) {
|
if (window.innerHeight + window.scrollY >= document.body.offsetHeight - window.innerHeight) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
if (this.selectedTab == 0) {
|
if (this.selectedTab == 0) {
|
||||||
|
@ -153,6 +153,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fetchChannelNextPage() {
|
fetchChannelNextPage() {
|
||||||
|
if (!this.channel.nextpage) return;
|
||||||
this.fetchJson(this.apiUrl() + "/nextpage/channel/" + this.channel.id, {
|
this.fetchJson(this.apiUrl() + "/nextpage/channel/" + this.channel.id, {
|
||||||
nextpage: this.channel.nextpage,
|
nextpage: this.channel.nextpage,
|
||||||
}).then(json => {
|
}).then(json => {
|
||||||
|
@ -163,6 +164,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
fetchChannelTabNextPage() {
|
fetchChannelTabNextPage() {
|
||||||
|
if (!this.tabNextPage) return;
|
||||||
this.fetchJson(this.apiUrl() + "/channels/tabs", {
|
this.fetchJson(this.apiUrl() + "/channels/tabs", {
|
||||||
data: this.tabs[this.selectedTab].data,
|
data: this.tabs[this.selectedTab].data,
|
||||||
nextpage: this.tabNextPage,
|
nextpage: this.tabNextPage,
|
||||||
|
|
Loading…
Reference in a new issue