fix missing data on collection list

This commit is contained in:
vapormusic 2022-01-23 10:17:02 +07:00
parent b3ff5e5365
commit fdaddfcc03

View file

@ -85,8 +85,8 @@
this.api.v3.music(this.data.next, app.collectionList.requestBody).then((response) => { this.api.v3.music(this.data.next, app.collectionList.requestBody).then((response) => {
console.log(response) console.log(response)
if (!app.collectionList.response.groups) { if (!app.collectionList.response.groups) {
if (response.data.next) {
this.data.data = this.data.data.concat(response.data.data); this.data.data = this.data.data.concat(response.data.data);
if (response.data.next) {
this.data.next = response.data.next; this.data.next = response.data.next;
this.triggerEnabled = true; this.triggerEnabled = true;
} }
@ -96,8 +96,8 @@
this.loading = false this.loading = false
return return
} }
if (response.data.results[app.collectionList.response.groups].next) {
this.data.data = this.data.data.concat(response.data.results[app.collectionList.response.groups].data); this.data.data = this.data.data.concat(response.data.results[app.collectionList.response.groups].data);
if (response.data.results[app.collectionList.response.groups].next) {
this.data.next = response.data.results[app.collectionList.response.groups].next; this.data.next = response.data.results[app.collectionList.response.groups].next;
this.triggerEnabled = true; this.triggerEnabled = true;
this.loading = false this.loading = false