mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-04-29 22:24:31 +02:00
fix(YouTube - Change live ring click action): Cannot play the playlist
This commit is contained in:
parent
12f5ae5650
commit
3a27a56df9
@ -1,5 +1,7 @@
|
||||
package app.revanced.extension.youtube.patches.general;
|
||||
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.facebook.litho.ComponentHost;
|
||||
@ -59,6 +61,14 @@ public final class OpenChannelOfLiveAvatarPatch {
|
||||
if (componentHost.getChildCount() != 1) {
|
||||
return;
|
||||
}
|
||||
// Play all button in playlist cannot be filtered with the above conditions
|
||||
// Check the ViewGroup tree
|
||||
if (!(componentHost.getChildAt(0) instanceof ComponentHost liveRingViewGroup)) {
|
||||
return;
|
||||
}
|
||||
if (!(liveRingViewGroup.getChildAt(0) instanceof ImageView)) {
|
||||
return;
|
||||
}
|
||||
// Fetch channel id
|
||||
videoId = newlyLoadedVideoId;
|
||||
VideoDetailsRequest.fetchRequestIfNeeded(newlyLoadedVideoId);
|
||||
|
Loading…
x
Reference in New Issue
Block a user