mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-04-29 22:24:31 +02:00
feat(YouTube Music - Hide action bar components): Add Hide Song / Video button
setting (YouTube Music 7.33.51+)
This commit is contained in:
parent
a23944945f
commit
4531187418
@ -35,10 +35,15 @@ public final class ActionButtonsFilter extends Filter {
|
||||
Settings.HIDE_ACTION_BUTTON_LIKE_DISLIKE,
|
||||
"segmented_like_dislike_button.eml"
|
||||
);
|
||||
final StringFilterGroup songVideoButton = new StringFilterGroup(
|
||||
Settings.HIDE_ACTION_BUTTON_SONG_VIDEO,
|
||||
"music_audio_video_button.eml"
|
||||
);
|
||||
addPathCallbacks(
|
||||
bufferFilterPathRule,
|
||||
downloadButton,
|
||||
likeDislikeContainer
|
||||
likeDislikeContainer,
|
||||
songVideoButton
|
||||
);
|
||||
|
||||
bufferButtonsGroupList.addAll(
|
||||
|
@ -39,6 +39,7 @@ public class Settings extends BaseSettings {
|
||||
public static final BooleanSetting HIDE_ACTION_BUTTON_ADD_TO_PLAYLIST = new BooleanSetting("revanced_hide_action_button_add_to_playlist", FALSE, true);
|
||||
public static final BooleanSetting HIDE_ACTION_BUTTON_DOWNLOAD = new BooleanSetting("revanced_hide_action_button_download", FALSE, true);
|
||||
public static final BooleanSetting HIDE_ACTION_BUTTON_SHARE = new BooleanSetting("revanced_hide_action_button_share", FALSE, true);
|
||||
public static final BooleanSetting HIDE_ACTION_BUTTON_SONG_VIDEO = new BooleanSetting("revanced_hide_action_button_song_video", FALSE, true);
|
||||
public static final BooleanSetting HIDE_ACTION_BUTTON_RADIO = new BooleanSetting("revanced_hide_action_button_radio", FALSE, true);
|
||||
public static final BooleanSetting HIDE_ACTION_BUTTON_LABEL = new BooleanSetting("revanced_hide_action_button_label", FALSE, true);
|
||||
public static final BooleanSetting EXTERNAL_DOWNLOADER_ACTION_BUTTON = new BooleanSetting("revanced_external_downloader_action", FALSE, true);
|
||||
|
@ -12,6 +12,7 @@ import app.revanced.patches.music.utils.extension.Constants.COMPONENTS_PATH
|
||||
import app.revanced.patches.music.utils.patch.PatchList.HIDE_ACTION_BAR_COMPONENTS
|
||||
import app.revanced.patches.music.utils.playservice.is_7_17_or_greater
|
||||
import app.revanced.patches.music.utils.playservice.is_7_25_or_greater
|
||||
import app.revanced.patches.music.utils.playservice.is_7_33_or_greater
|
||||
import app.revanced.patches.music.utils.playservice.versionCheckPatch
|
||||
import app.revanced.patches.music.utils.resourceid.likeDislikeContainer
|
||||
import app.revanced.patches.music.utils.resourceid.sharedResourceIdPatch
|
||||
@ -223,6 +224,13 @@ val actionBarComponentsPatch = bytecodePatch(
|
||||
"revanced_hide_action_button_share",
|
||||
"false"
|
||||
)
|
||||
if (is_7_33_or_greater) {
|
||||
addSwitchPreference(
|
||||
CategoryType.ACTION_BAR,
|
||||
"revanced_hide_action_button_song_video",
|
||||
"false"
|
||||
)
|
||||
}
|
||||
if (!is_7_25_or_greater) {
|
||||
addSwitchPreference(
|
||||
CategoryType.ACTION_BAR,
|
||||
|
@ -40,6 +40,9 @@
|
||||
<string name="revanced_hide_action_button_radio_summary">Hides the Radio button.</string>
|
||||
<string name="revanced_hide_action_button_share_title">Hide Share button</string>
|
||||
<string name="revanced_hide_action_button_share_summary">Hides the Share button.</string>
|
||||
<string name="revanced_hide_action_button_song_video_title">Hide Song / Video button</string>
|
||||
<string name="revanced_hide_action_button_song_video_summary">"Hides the Song / Video button.
|
||||
(This button is only available to some users)"</string>
|
||||
<string name="revanced_hide_action_button_label_title">Hide action button labels</string>
|
||||
<string name="revanced_hide_action_button_label_summary">Hides the labels of the action buttons.</string>
|
||||
<string name="revanced_external_downloader_action_title">Override Download action button</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user