Skip to content

Commit

Permalink
fix: default values for settings
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Aug 22, 2022
1 parent 163a51a commit 6f5596f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Expand Up @@ -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);
}

Expand Down
@@ -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();

}

Expand Down
Expand Up @@ -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),
Expand Down

0 comments on commit 6f5596f

Please sign in to comment.