fix for context menu follow
This commit is contained in:
parent
80f78edbf3
commit
9b05cde0d2
2 changed files with 27 additions and 12 deletions
|
@ -413,6 +413,7 @@
|
|||
})
|
||||
},
|
||||
menu(event) {
|
||||
let self = this
|
||||
let menuItems = {
|
||||
items: {
|
||||
"share": {
|
||||
|
@ -448,7 +449,7 @@
|
|||
icon: "./assets/feather/plus-circle.svg",
|
||||
hidden: false,
|
||||
action: () => {
|
||||
app.followArtistById(this.data.id, true)
|
||||
app.followArtistById(this.data.relationships.artists.data[0].id, true)
|
||||
}
|
||||
},
|
||||
"unfollow": {
|
||||
|
@ -456,18 +457,24 @@
|
|||
icon: "./assets/feather/x-circle.svg",
|
||||
hidden: true,
|
||||
action: () => {
|
||||
app.followArtistById(this.data.id, false)
|
||||
app.followArtistById(this.data.relationships.artists.data[0].id, false)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
if(app.followingArtist(this.data.id)){
|
||||
if(typeof this.data.relationships.artists != "undefined") {
|
||||
if(app.followingArtist(this.data.relationships.artists.data[0].id)){
|
||||
menuItems.items.follow.hidden = true
|
||||
menuItems.items.unfollow.hidden = false
|
||||
} else {
|
||||
menuItems.items.follow.hidden = false
|
||||
menuItems.items.unfollow.hidden = true
|
||||
}
|
||||
}else{
|
||||
menuItems.items.follow.hidden = true
|
||||
menuItems.items.unfollow.hidden = true
|
||||
}
|
||||
|
||||
app.showMenuPanel(menuItems, event)
|
||||
|
||||
},
|
||||
|
|
|
@ -437,6 +437,7 @@
|
|||
})
|
||||
},
|
||||
menu(event) {
|
||||
let self = this
|
||||
let menuItems = {
|
||||
items: {
|
||||
"share": {
|
||||
|
@ -472,7 +473,7 @@
|
|||
icon: "./assets/feather/plus-circle.svg",
|
||||
hidden: false,
|
||||
action: () => {
|
||||
app.followArtistById(this.data.id, true)
|
||||
app.followArtistById(this.data.relationships.artists.data[0].id, true)
|
||||
}
|
||||
},
|
||||
"unfollow": {
|
||||
|
@ -480,20 +481,27 @@
|
|||
icon: "./assets/feather/x-circle.svg",
|
||||
hidden: true,
|
||||
action: () => {
|
||||
app.followArtistById(this.data.id, false)
|
||||
app.followArtistById(this.data.relationships.artists.data[0].id, false)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
if(app.followingArtist(this.data.id)){
|
||||
if(typeof this.data.relationships.artists != "undefined") {
|
||||
if(app.followingArtist(this.data.relationships.artists.data[0].id)){
|
||||
menuItems.items.follow.hidden = true
|
||||
menuItems.items.unfollow.hidden = false
|
||||
} else {
|
||||
menuItems.items.follow.hidden = false
|
||||
menuItems.items.unfollow.hidden = true
|
||||
}
|
||||
}else{
|
||||
menuItems.items.follow.hidden = true
|
||||
menuItems.items.unfollow.hidden = true
|
||||
}
|
||||
|
||||
app.showMenuPanel(menuItems, event)
|
||||
|
||||
|
||||
},
|
||||
getItemParent: function (data) {
|
||||
kind = data.attributes.playParams.kind;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue