Skip to content

Commit

Permalink
Fix hide sharing actions also hiding hide/show channel (#5110)
Browse files Browse the repository at this point in the history
  • Loading branch information
absidue authored May 14, 2024
1 parent a9c9f10 commit 2fcd5c9
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions src/renderer/components/ft-list-video/ft-list-video.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,28 +285,32 @@ export default defineComponent({
{
label: this.$t('Video.Open Channel in Invidious'),
value: 'openInvidiousChannel'
},
{
type: 'divider'
}
)

const hiddenChannels = JSON.parse(this.$store.getters.getChannelsHidden)
const channelShouldBeHidden = hiddenChannels.some(c => c === this.channelId)
if (channelShouldBeHidden) {
options.push({
label: this.$t('Video.Unhide Channel'),
value: 'unhideChannel'
})
} else {
options.push({
label: this.$t('Video.Hide Channel'),
value: 'hideChannel'
})
}
}
}

if (this.channelId !== null) {
const hiddenChannels = JSON.parse(this.$store.getters.getChannelsHidden)
const channelShouldBeHidden = hiddenChannels.some(c => c === this.channelId)

options.push(
{
type: 'divider'
},

channelShouldBeHidden
? {
label: this.$t('Video.Unhide Channel'),
value: 'unhideChannel'
}
: {
label: this.$t('Video.Hide Channel'),
value: 'hideChannel'
}
)
}

return options
},

Expand Down

0 comments on commit 2fcd5c9

Please sign in to comment.