mirror of
https://github.com/revanced/revanced-integrations
synced 2024-11-27 11:13:38 +01:00
fix: default values for settings
This commit is contained in:
parent
163a51af57
commit
6f5596f227
@ -13,7 +13,7 @@ public class HideHomeAdsPatch {
|
||||
* @param view
|
||||
*/
|
||||
public static void HideHomeAds(View view) {
|
||||
if (!SettingsEnum.HOME_ADS_HIDDEN.getBoolean()) return;
|
||||
if (!SettingsEnum.HOME_ADS_REMOVAL.getBoolean()) return;
|
||||
AdRemoverAPI.HideViewWithLayout1dp(view);
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,13 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
import app.revanced.integrations.whitelist.Whitelist;
|
||||
|
||||
public class VideoAdsPatch {
|
||||
|
||||
// Used by app.revanced.patches.youtube.ad.general.video.patch.VideoAdsPatch
|
||||
// depends on Whitelist patch (still needs to be written)
|
||||
public static boolean shouldShowAds() {
|
||||
return !SettingsEnum.VIDEO_ADS_HIDDEN.getBoolean(); // TODO && Whitelist.shouldShowAds();
|
||||
return !SettingsEnum.VIDEO_ADS_REMOVAL.getBoolean(); // TODO && Whitelist.shouldShowAds();
|
||||
|
||||
}
|
||||
|
||||
|
@ -25,8 +25,8 @@ public enum SettingsEnum {
|
||||
ENABLE_WHITELIST("revanced_whitelist_ads_enabled", false, ReturnType.BOOLEAN),
|
||||
|
||||
//Ad settings
|
||||
HOME_ADS_HIDDEN("revanced_home_ads_enabled", true, ReturnType.BOOLEAN, true),
|
||||
VIDEO_ADS_HIDDEN("revanced_video_ads_enabled", true, ReturnType.BOOLEAN, true),
|
||||
HOME_ADS_REMOVAL("revanced_home_ads_removal", true, ReturnType.BOOLEAN, true),
|
||||
VIDEO_ADS_REMOVAL("revanced_video_ads_removal", true, ReturnType.BOOLEAN, true),
|
||||
ADREMOVER_AD_REMOVAL("revanced_adremover_ad_removal", true, ReturnType.BOOLEAN, true),
|
||||
ADREMOVER_MERCHANDISE_REMOVAL("revanced_adremover_merchandise", true, ReturnType.BOOLEAN, true),
|
||||
ADREMOVER_COMMUNITY_POSTS_REMOVAL("revanced_adremover_community_posts_removal", true, ReturnType.BOOLEAN, true),
|
||||
|
Loading…
Reference in New Issue
Block a user