Skip to content

Commit

Permalink
move showResult from a method to a computed to work with v-if
Browse files Browse the repository at this point in the history
  • Loading branch information
petaded committed Jun 18, 2023
1 parent 447078a commit 8dadb59
Showing 1 changed file with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,7 @@ export default defineComponent({
},
hideUpcomingPremieres: function () {
return this.$store.getters.getHideUpcomingPremieres
}
},
methods: {
onVisibilityChanged: function (visible) {
this.visible = visible
},

/**
* Show or Hide results in the list
*
Expand All @@ -74,10 +68,10 @@ export default defineComponent({
if (this.hideUpcomingPremieres &&
// Observed for premieres in Local API Channels.
(data.durationText === 'PREMIERE' ||
// viewCount is our only method of detecting premieres in RSS
// data without sending an additional request.
// If we ever get a better flag, use it here instead.
(data.isRSS && data.viewCount === '0'))) {
// viewCount is our only method of detecting premieres in RSS
// data without sending an additional request.
// If we ever get a better flag, use it here instead.
(data.isRSS && data.viewCount === '0'))) {
// hide upcoming
return false
}
Expand All @@ -98,6 +92,11 @@ export default defineComponent({
}
return true
}
},
methods: {
onVisibilityChanged: function (visible) {
this.visible = visible
}

}
})

0 comments on commit 8dadb59

Please sign in to comment.