mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-08-30 02:56:21 +02:00
feat(youtube/general-ads): remove hiding video shelf
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
parent
32dc8a846c
commit
04147c17c9
@ -1,7 +1,6 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import app.revanced.integrations.adremover.AdRemoverAPI;
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
import app.revanced.integrations.utils.LogHelper;
|
||||
@ -32,7 +31,6 @@ public final class GeneralAdsPatch extends Filter {
|
||||
var paidContent = new BlockRule(SettingsEnum.ADREMOVER_PAID_CONTENT_REMOVAL, "paid_content_overlay");
|
||||
var merchandise = new BlockRule(SettingsEnum.ADREMOVER_MERCHANDISE_REMOVAL, "product_carousel");
|
||||
var infoPanel = new BlockRule(SettingsEnum.ADREMOVER_INFO_PANEL_REMOVAL, "publisher_transparency_panel", "single_item_information_panel");
|
||||
var suggestions = new BlockRule(SettingsEnum.ADREMOVER_SUGGESTIONS_REMOVAL, "horizontal_video_shelf");
|
||||
var latestPosts = new BlockRule(SettingsEnum.ADREMOVER_HIDE_LATEST_POSTS, "post_shelf");
|
||||
var channelGuidelines = new BlockRule(SettingsEnum.ADREMOVER_HIDE_CHANNEL_GUIDELINES, "channel_guidelines_entry_banner");
|
||||
var artistCard = new BlockRule(SettingsEnum.HIDE_ARTIST_CARD, "official_card");
|
||||
@ -69,7 +67,6 @@ public final class GeneralAdsPatch extends Filter {
|
||||
buttonedAd,
|
||||
communityPosts,
|
||||
paidContent,
|
||||
suggestions,
|
||||
latestPosts,
|
||||
movieAds,
|
||||
chapterTeaser,
|
||||
|
@ -1,14 +1,13 @@
|
||||
package app.revanced.integrations.settings;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import app.revanced.integrations.utils.LogHelper;
|
||||
import app.revanced.integrations.utils.ReVancedUtils;
|
||||
import app.revanced.integrations.utils.SharedPrefHelper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public enum SettingsEnum {
|
||||
//Download Settings
|
||||
// TODO: DOWNLOAD_PATH("revanced_download_path", Environment.getExternalStorageDirectory().getPath() + "/Download", ReturnType.STRING),
|
||||
@ -47,7 +46,6 @@ public enum SettingsEnum {
|
||||
ADREMOVER_INFO_PANEL_REMOVAL("revanced_adremover_info_panel", true, ReturnType.BOOLEAN),
|
||||
ADREMOVER_MEDICAL_PANEL_REMOVAL("revanced_adremover_medical_panel", true, ReturnType.BOOLEAN),
|
||||
ADREMOVER_PAID_CONTENT_REMOVAL("revanced_adremover_paid_content", true, ReturnType.BOOLEAN),
|
||||
ADREMOVER_SUGGESTIONS_REMOVAL("revanced_adremover_hide_suggestions", true, ReturnType.BOOLEAN),
|
||||
ADREMOVER_HIDE_LATEST_POSTS("revanced_adremover_hide_latest_posts", true, ReturnType.BOOLEAN),
|
||||
ADREMOVER_HIDE_CHANNEL_GUIDELINES("revanced_adremover_hide_channel_guidelines", true, ReturnType.BOOLEAN),
|
||||
ADREMOVER_SELF_SPONSOR_REMOVAL("revanced_adremover_self_sponsor", true, ReturnType.BOOLEAN),
|
||||
@ -225,7 +223,7 @@ public enum SettingsEnum {
|
||||
//
|
||||
|
||||
// old/new settings where old is default off, and new has inverted value and is default on
|
||||
SettingsEnum invertedSettingsToMigrate[][] = {
|
||||
SettingsEnum[][] invertedSettingsToMigrate = {
|
||||
{DEPRECATED_FULLSCREEN_PANELS_SHOWN, HIDE_FULLSCREEN_PANELS},
|
||||
{DEPRECATED_CREATE_BUTTON_ENABLED, HIDE_CREATE_BUTTON},
|
||||
{DEPRECATED_SHORTS_BUTTON_SHOWN, HIDE_SHORTS_BUTTON},
|
||||
@ -235,7 +233,7 @@ public enum SettingsEnum {
|
||||
{DEPRECATED_BRANDING_SHOWN, HIDE_VIDEO_WATERMARK},
|
||||
{DEPRECATED_REMEMBER_VIDEO_QUALITY, REMEMBER_VIDEO_QUALITY_LAST_SELECTED},
|
||||
};
|
||||
for (SettingsEnum oldNewSetting[] : invertedSettingsToMigrate) {
|
||||
for (SettingsEnum[] oldNewSetting : invertedSettingsToMigrate) {
|
||||
// by default, old setting was default off
|
||||
// migrate to new setting of default on
|
||||
SettingsEnum oldSetting = oldNewSetting[0];
|
||||
@ -254,7 +252,7 @@ public enum SettingsEnum {
|
||||
//
|
||||
// migrate preference of prior 'default off' settings, into replacement setting with different path name but otherwise is identical
|
||||
//
|
||||
SettingsEnum renamedSettings[][] = {
|
||||
SettingsEnum[][] renamedSettings = {
|
||||
{DEPRECATED_HIDE_MIX_PLAYLISTS, HIDE_MIX_PLAYLISTS},
|
||||
{DEPRECATED_HIDE_LIKE_BUTTON, HIDE_LIKE_BUTTON},
|
||||
{DEPRECATED_HIDE_DISLIKE_BUTTON, HIDE_DISLIKE_BUTTON},
|
||||
@ -263,7 +261,7 @@ public enum SettingsEnum {
|
||||
{DEPRECATED_HIDE_ACTION_BUTTON, HIDE_ACTION_BUTTON},
|
||||
{DEPRECATED_HIDE_SHARE_BUTTON, HIDE_SHARE_BUTTON},
|
||||
};
|
||||
for (SettingsEnum oldNewSetting[] : renamedSettings) {
|
||||
for (SettingsEnum[] oldNewSetting : renamedSettings) {
|
||||
SettingsEnum oldSetting = oldNewSetting[0];
|
||||
SettingsEnum newSetting = oldNewSetting[1];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user