mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-02 07:34:31 +02:00
fix(YouTube Music): App crashes when including Hide action bar components
patch https://github.com/inotia00/ReVanced_Extended/issues/2584
This commit is contained in:
parent
92a317e312
commit
b92b79e96c
@ -8,6 +8,7 @@ import android.view.View;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import app.revanced.extension.music.settings.Settings;
|
import app.revanced.extension.music.settings.Settings;
|
||||||
|
import app.revanced.extension.music.utils.VideoUtils;
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public class ActionBarPatch {
|
public class ActionBarPatch {
|
||||||
@ -39,6 +40,15 @@ public class ActionBarPatch {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void inAppDownloadButtonOnClick(View view) {
|
||||||
|
if (!Settings.EXTERNAL_DOWNLOADER_ACTION_BUTTON.get()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (buttonType.equals(ActionButton.DOWNLOAD.name))
|
||||||
|
view.setOnClickListener(imageView -> VideoUtils.launchExternalDownloader());
|
||||||
|
}
|
||||||
|
|
||||||
public static void setButtonType(@NonNull Object obj) {
|
public static void setButtonType(@NonNull Object obj) {
|
||||||
final String buttonType = obj.toString();
|
final String buttonType = obj.toString();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user