@@ -74,46 +74,16 @@ export default defineComponent({
74
74
isCurrentVideo : {
75
75
type : Boolean ,
76
76
default : false
77
- } ,
78
- useChannelsHiddenPreference : {
79
- type : Boolean ,
80
- default : false ,
81
77
}
82
78
} ,
83
79
emits : [ 'move-video-down' , 'move-video-up' , 'pause-player' , 'remove-from-playlist' ] ,
84
80
data : function ( ) {
85
81
return {
86
- visible : false ,
87
- show : true ,
82
+ visible : this . initialVisibleState ,
88
83
stopWatchingInitialVisibleState : null
89
84
}
90
85
} ,
91
- computed : {
92
- channelsHidden ( ) {
93
- // Some component users like channel view will have this disabled
94
- if ( ! this . useChannelsHiddenPreference ) { return [ ] }
95
-
96
- return JSON . parse ( this . $store . getters . getChannelsHidden ) . map ( ( ch ) => {
97
- // Legacy support
98
- if ( typeof ch === 'string' ) {
99
- return { name : ch , preferredName : '' , icon : '' }
100
- }
101
- return ch
102
- } )
103
- } ,
104
-
105
- // As we only use this component in Playlist and watch-video-playlist,
106
- // where title filtering is never desired, we don't have any title filtering logic here,
107
- // like we do in ft-list-video-lazy
108
-
109
- shouldBeVisible ( ) {
110
- return ! ( this . channelsHidden . some ( ch => ch . name === this . data . authorId ) ||
111
- this . channelsHidden . some ( ch => ch . name === this . data . author ) )
112
- }
113
- } ,
114
86
created ( ) {
115
- this . visible = this . initialVisibleState
116
-
117
87
if ( ! this . initialVisibleState ) {
118
88
this . stopWatchingInitialVisibleState = this . $watch ( 'initialVisibleState' , ( newValue ) => {
119
89
this . visible = newValue
@@ -124,18 +94,12 @@ export default defineComponent({
124
94
} ,
125
95
methods : {
126
96
onVisibilityChanged : function ( visible ) {
127
- if ( visible && this . shouldBeVisible ) {
97
+ if ( visible ) {
128
98
this . visible = visible
129
99
if ( this . stopWatchingInitialVisibleState ) {
130
100
this . stopWatchingInitialVisibleState ( )
131
101
this . stopWatchingInitialVisibleState = null
132
102
}
133
- } else if ( visible ) {
134
- this . show = false
135
- if ( this . stopWatchingInitialVisibleState ) {
136
- this . stopWatchingInitialVisibleState ( )
137
- this . stopWatchingInitialVisibleState = null
138
- }
139
103
}
140
104
} ,
141
105
pausePlayer : function ( ) {
0 commit comments