Skip to content

Commit

Permalink
! Fix grid item for video in watch page playlist component with user …
Browse files Browse the repository at this point in the history
…playlist to hide external player button
  • Loading branch information
PikachuEXE committed Sep 19, 2023
1 parent db6e2bc commit 2fd43b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ export default defineComponent({
selectedUserPlaylistLastUpdatedAt () {
return this.selectedUserPlaylist?.lastUpdatedAt
},
playlistType() {
if (this.selectedUserPlaylist != null) { return 'user' }

return ''
},

currentVideoIndexZeroBased: function () {
return this.playlistItems.findIndex((item) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,12 @@
<ft-list-video-lazy
:data="item"
:playlist-id="playlistId"
:playlist-type="playlistType"
:playlist-index="reversePlaylist ? playlistItems.length - index - 1 : index"
:unique-id="item.uniqueId"
:playlist-reverse="reversePlaylist"
:playlist-shuffle="shuffleEnabled"
:playlist-loop="loopEnabled"
:unique-id="item.uniqueId"
appearance="watchPlaylistItem"
force-list-type="list"
:initial-visible-state="index < (currentVideoIndexZeroBased + 4) && index > (currentVideoIndexZeroBased - 4)"
Expand Down

0 comments on commit 2fd43b5

Please sign in to comment.