Skip to content

Commit

Permalink
Update some views to opt out of "Hide Videos From Channels" (#3748)
Browse files Browse the repository at this point in the history
* * Update channel view to opt out of "Hide Videos From Channels"

* * Update history, local playlist & subscription view to opt out of "Hide Videos From Channels"
  • Loading branch information
PikachuEXE authored Jul 13, 2023
1 parent 325b36e commit 35868b4
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/renderer/components/ft-element-list/ft-element-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ export default defineComponent({
showVideoWithLastViewedPlaylist: {
type: Boolean,
default: false
}
},
useChannelsHiddenPreference: {
type: Boolean,
default: true,
},
},
computed: {
listType: function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
:first-screen="index < 16"
:layout="displayValue"
:show-video-with-last-viewed-playlist="showVideoWithLastViewedPlaylist"
:use-channels-hidden-preference="useChannelsHiddenPreference"
/>
</ft-auto-grid>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ export default defineComponent({
type: Boolean,
default: false
},
useChannelsHiddenPreference: {
type: Boolean,
default: true,
},
},
data: function () {
return {
Expand All @@ -44,6 +48,9 @@ export default defineComponent({
return this.$store.getters.getHideLiveStreams
},
channelsHidden: function() {
// Some component users like channel view will have this disabled
if (!this.useChannelsHiddenPreference) { return [] }

return JSON.parse(this.$store.getters.getChannelsHidden)
},
hideUpcomingPremieres: function () {
Expand Down
6 changes: 6 additions & 0 deletions src/renderer/views/Channel/Channel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@
v-show="currentTab === 'videos'"
id="videoPanel"
:data="latestVideos"
:use-channels-hidden-preference="false"
role="tabpanel"
aria-labelledby="videosTab"
/>
Expand All @@ -258,6 +259,7 @@
v-if="!hideChannelShorts && currentTab === 'shorts'"
id="shortPanel"
:data="latestShorts"
:use-channels-hidden-preference="false"
role="tabpanel"
aria-labelledby="shortsTab"
/>
Expand All @@ -273,6 +275,7 @@
v-show="currentTab === 'live'"
id="livePanel"
:data="latestLive"
:use-channels-hidden-preference="false"
role="tabpanel"
aria-labelledby="liveTab"
/>
Expand All @@ -287,6 +290,7 @@
v-if="!hideChannelPlaylists && currentTab === 'playlists'"
id="playlistPanel"
:data="latestPlaylists"
:use-channels-hidden-preference="false"
role="tabpanel"
aria-labelledby="playlistsTab"
/>
Expand All @@ -301,6 +305,7 @@
v-if="!hideChannelCommunity && currentTab === 'community'"
id="communityPanel"
:data="latestCommunityPosts"
:use-channels-hidden-preference="false"
role="tabpanel"
aria-labelledby="communityTab"
display="list"
Expand All @@ -315,6 +320,7 @@
<ft-element-list
v-show="currentTab === 'search'"
:data="searchResults"
:use-channels-hidden-preference="false"
/>
<ft-flex-box
v-if="currentTab === 'search' && searchResults.length === 0"
Expand Down
1 change: 1 addition & 0 deletions src/renderer/views/History/History.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
v-if="activeData.length > 0 && !isLoading"
:data="activeData"
:show-video-with-last-viewed-playlist="true"
:use-channels-hidden-preference="false"
/>
<ft-flex-box
v-if="showLoadMoreButton"
Expand Down
1 change: 1 addition & 0 deletions src/renderer/views/Subscriptions/Subscriptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
<ft-element-list
v-else
:data="activeVideoList"
:use-channels-hidden-preference="false"
/>
<ft-flex-box>
<ft-button
Expand Down
1 change: 1 addition & 0 deletions src/renderer/views/UserPlaylists/UserPlaylists.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<ft-element-list
v-if="activeData.length > 0 && !isLoading"
:data="activeData"
:use-channels-hidden-preference="false"
/>
<ft-flex-box
v-if="showLoadMoreButton"
Expand Down

0 comments on commit 35868b4

Please sign in to comment.