add missing return in methods
This commit is contained in:
parent
ca94462d93
commit
d002a5c09a
@ -67,7 +67,7 @@
|
|||||||
'showMenu',
|
'showMenu',
|
||||||
]),
|
]),
|
||||||
scan() {
|
scan() {
|
||||||
this.$api.scan()
|
return this.$api.scan()
|
||||||
},
|
},
|
||||||
logout() {
|
logout() {
|
||||||
this.$auth.logout()
|
this.$auth.logout()
|
||||||
|
@ -29,12 +29,11 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toggleStarred() {
|
toggleStarred() {
|
||||||
if (this.starred) {
|
|
||||||
this.$api.unstar('track', this.track.id)
|
|
||||||
} else {
|
|
||||||
this.$api.star('track', this.track.id)
|
|
||||||
}
|
|
||||||
this.starred = !this.starred
|
this.starred = !this.starred
|
||||||
|
if (this.starred) {
|
||||||
|
return this.$api.unstar('track', this.track.id)
|
||||||
|
}
|
||||||
|
return this.$api.star('track', this.track.id)
|
||||||
},
|
},
|
||||||
setNextInQueue() {
|
setNextInQueue() {
|
||||||
return this.$store.dispatch('player/setNextInQueue', this.track)
|
return this.$store.dispatch('player/setNextInQueue', this.track)
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
methods: {
|
methods: {
|
||||||
loadMore() {
|
loadMore() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.$api.getAlbums(this.sort as AlbumSort, 50, this.offset).then(albums => {
|
return this.$api.getAlbums(this.sort as AlbumSort, 50, this.offset).then(albums => {
|
||||||
this.albums.push(...albums)
|
this.albums.push(...albums)
|
||||||
this.offset += albums.length
|
this.offset += albums.length
|
||||||
this.hasMore = albums.length > 0
|
this.hasMore = albums.length > 0
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
methods: {
|
methods: {
|
||||||
loadMore() {
|
loadMore() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.load(this.offset).then((items: any[]) => {
|
return this.load(this.offset).then((items: any[]) => {
|
||||||
this.items.push(...items)
|
this.items.push(...items)
|
||||||
this.offset += items.length
|
this.offset += items.length
|
||||||
this.hasMore = items.length > 0
|
this.hasMore = items.length > 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user