1
mirror of https://github.com/revanced/revanced-integrations synced 2025-11-19 03:23:27 +01:00

Compare commits

...

4 Commits

Author SHA1 Message Date
semantic-release-bot
0c325c093b chore(release): 0.19.1-dev.1 [skip ci]
## [0.19.1-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.19.0...v0.19.1-dev.1) (2022-07-02)

### Bug Fixes

* add missing dummy task `publish` ([3a2655b](3a2655b38b))
* prepare for hide-suggestions patch ([#35](https://github.com/revanced/revanced-integrations/issues/35)) ([b2d08e9](b2d08e9e9f))
2022-07-02 11:58:16 +00:00
oSumAtrIX
e1145a65e0 Merge branch 'main' into dev 2022-07-02 13:56:25 +02:00
Joey Peter
5f5b1cace9 refactor: remove no longer used feature. was added from youtube already (#36) 2022-07-02 00:42:22 +02:00
Joey Peter
b2d08e9e9f fix: prepare for hide-suggestions patch (#35) 2022-07-02 00:26:02 +02:00
10 changed files with 17 additions and 72 deletions

7
CHANGELOG.md Normal file
View File

@@ -0,0 +1,7 @@
## [0.19.1-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.19.0...v0.19.1-dev.1) (2022-07-02)
### Bug Fixes
* add missing dummy task `publish` ([3a2655b](https://github.com/revanced/revanced-integrations/commit/3a2655b38b7e2994ece550ccefadbc70a31f7fa4))
* prepare for hide-suggestions patch ([#35](https://github.com/revanced/revanced-integrations/issues/35)) ([b2d08e9](https://github.com/revanced/revanced-integrations/commit/b2d08e9e9fbb1df69ceb5234d3f092027904c1e1))

View File

@@ -73,32 +73,6 @@ public class AdRemoverAPI {
}
}
/**
* Removes the InfoCardSuggestions
*
* @param InfoCardOverlayPresenter
* @return
*/
public static Object removeInfoCardSuggestions(Object InfoCardOverlayPresenter) {
if (!SettingsEnum.INFO_CARDS_SHOWN_BOOLEAN.getBoolean()) InfoCardOverlayPresenter = null;
String message = InfoCardOverlayPresenter == null ? "RemoveInfoCardSuggestions: true" : "RemoveInfoCardSuggestions: false";
LogHelper.debug(AdRemoverAPI.class, message);
return InfoCardOverlayPresenter;
}
/**
* Removes the Suggestions
*
* @param showSuggestions
* @return
*/
public static Boolean removeSuggestions(Boolean showSuggestions) {
if (!SettingsEnum.SUGGESTIONS_SHOWN_BOOLEAN.getBoolean()) showSuggestions = false;
String message = showSuggestions ? "RemoveSuggestions: true" : "RemoveSuggestions: false";
LogHelper.debug(AdRemoverAPI.class, message);
return showSuggestions;
}
/*
private static void inspectComponentHost(Object item) {
StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace();

View File

@@ -4,8 +4,8 @@ import app.revanced.integrations.settings.SettingsEnum;
public class AutoRepeatPatch {
//ToDo: Write Patch for it.
//See https://drive.google.com/file/d/1hLl71Mm3oAtgTjNvsYZi3CUutCPx2gjS/view?usp=sharing for where it needs to be used.
//Used by app.revanced.patches.youtube.layout.autorepeat.patch.AutoRepeatPatch
public static boolean shouldAutoRepeat() {
return SettingsEnum.PREFERRED_AUTO_REPEAT_BOOLEAN.getBoolean();
}

View File

@@ -5,8 +5,7 @@ import app.revanced.integrations.videoswipecontrols.helpers.BrightnessHelper;
public class HDRMaxBrightnessPatch {
//ToDo: Write Patch for it.
//See https://drive.google.com/file/d/1rIJzsaMQouH_2__EcVY5Dg6l7ji9vsyP/view?usp=sharing for where it needs to be used.
//Used by app/revanced/patches/youtube/misc/hdrbrightness/patch/HDRBrightnessPatch
public static float getHDRBrightness(float original) {
if (!SettingsEnum.USE_HDR_BRIGHTNESS_BOOLEAN.getBoolean()) return original;
return SettingsEnum.ENABLE_SWIPE_BRIGHTNESS_BOOLEAN.getBoolean() ? BrightnessHelper.getBrightness() : -1.0f;

View File

@@ -1,12 +1,10 @@
package app.revanced.integrations.patches;
import app.revanced.integrations.adremover.AdRemoverAPI;
import app.revanced.integrations.settings.SettingsEnum;
public class HideInfoCardSuggestionsPatch {
//TODO: Create Patch
//Not used yet
public static void HideInfoCardSuggestions(Object InfoCardOverlayPresenter) {
AdRemoverAPI.removeInfoCardSuggestions(InfoCardOverlayPresenter);
public static int hideInfoCardSuggestions() {
return SettingsEnum.INFO_CARDS_SHOWN_BOOLEAN.getBoolean() ? 0 : 8;
}
}

View File

@@ -1,13 +0,0 @@
package app.revanced.integrations.patches;
import app.revanced.integrations.adremover.AdRemoverAPI;
public class HideSuggestionsPatch {
//TODO: Create Patch
//Not used yet
public static void HideSuggestions(boolean showSuggestions) {
AdRemoverAPI.removeSuggestions(showSuggestions);
}
}

View File

@@ -23,7 +23,6 @@ public enum SettingsEnum {
SHORTS_BUTTON_SHOWN_BOOLEAN("shorts_button_enabled", false),
CAST_BUTTON_SHOWN_BOOLEAN("cast_button_enabled", false),
CREATE_BUTTON_SHOWN_BOOLEAN("revanced_create_button_enabled", false),
SUGGESTIONS_SHOWN_BOOLEAN("info_card_suggestions_enabled", false),
INFO_CARDS_SHOWN_BOOLEAN("info_cards_enabled", false),
BRANDING_SHOWN_BOOLEAN("branding_watermark_enabled", false),
USE_TABLET_MINIPLAYER_BOOLEAN("tablet_miniplayer", false),

View File

@@ -98,8 +98,6 @@ public class ReVancedSettingsFragment extends PreferenceFragment {
if (ReVancedUtils.getContext() != null && settingsInitialized) {
rebootDialog(getActivity());
}
} else if (str.equals(SettingsEnum.SUGGESTIONS_SHOWN_BOOLEAN.getPath())) {
SettingsEnum.SUGGESTIONS_SHOWN_BOOLEAN.setValue(((SwitchPreference) layoutSettingsPreferenceScreen.findPreference(str)).isChecked());
} else if (str.equals(SettingsEnum.INFO_CARDS_SHOWN_BOOLEAN.getPath())) {
SettingsEnum.INFO_CARDS_SHOWN_BOOLEAN.setValue(((SwitchPreference) layoutSettingsPreferenceScreen.findPreference(str)).isChecked());
} else if (str.equals(SettingsEnum.BRANDING_SHOWN_BOOLEAN.getPath())) {

View File

@@ -43,7 +43,6 @@
<PreferenceScreen android:title="@string/revanced_layout_settings_title" android:key="layout_settings">
<SwitchPreference android:title="@string/revanced_reel_title" android:key="reel_enabled" android:defaultValue="true" android:summaryOn="@string/revanced_reel_summary_on" android:summaryOff="@string/revanced_reel_summary_off" />
<SwitchPreference android:title="@string/revanced_suggestion_title" android:key="info_cards_enabled" android:defaultValue="true" android:summaryOn="@string/revanced_suggestion_summary_on" android:summaryOff="@string/revanced_suggestion_summary_off" />
<SwitchPreference android:title="@string/revanced_info_cards_title" android:key="info_card_suggestions_enabled" android:defaultValue="true" android:summaryOn="@string/revanced_info_cards_summary_on" android:summaryOff="@string/revanced_info_cards_summary_off" />
<SwitchPreference android:title="@string/revanced_branding_watermark_title" android:key="branding_watermark_enabled" android:defaultValue="true" android:summaryOn="@string/revanced_branding_watermark_summary_on" android:summaryOff="@string/revanced_branding_watermark_summary_off" />
<SwitchPreference android:title="@string/revanced_cast_button_title" android:key="cast_button_enabled" android:defaultValue="true" android:summaryOn="@string/revanced_cast_button_summary_on" android:summaryOff="@string/revanced_cast_button_summary_off" />
<SwitchPreference android:title="@string/revanced_tablet_miniplayer_title" android:key="tablet_miniplayer" android:defaultValue="false" android:summaryOn="@string/revanced_tablet_miniplayer_summary_on" android:summaryOff="@string/revanced_tablet_miniplayer_summary_off" />

View File

@@ -1,20 +1,4 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
version = 0.19.0
org.gradle.jvmargs = -Xmx2048m
android.useAndroidX = true
android.enableJetifier = true
version = 0.19.1-dev.1