mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-13 05:37:40 +02:00
feat(YouTube - Settings): Add App name
, App version
and Patched date
to patch information
This commit is contained in:
@ -9,6 +9,11 @@ public class PatchStatus {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Modified by a patch. Do not touch.
|
||||
public static boolean OldSeekbarThumbnailsDefaultBoolean() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean OldSplashAnimation() {
|
||||
// Replace this with true if the Restore old splash animation (Custom branding icon) succeeds
|
||||
return false;
|
||||
@ -40,23 +45,22 @@ public class PatchStatus {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static String SpoofAppVersionDefaultString() {
|
||||
return "18.17.43";
|
||||
}
|
||||
|
||||
public static boolean ToolBarComponents() {
|
||||
// Replace this with true if the Toolbar components patch succeeds
|
||||
return false;
|
||||
}
|
||||
|
||||
public static long PatchedTime() {
|
||||
return 0L;
|
||||
}
|
||||
|
||||
public static String SpoofAppVersionDefaultString() {
|
||||
return "18.17.43";
|
||||
}
|
||||
|
||||
// Modified by a patch. Do not touch.
|
||||
public static String RVXMusicPackageName() {
|
||||
return "com.google.android.apps.youtube.music";
|
||||
}
|
||||
|
||||
// Modified by a patch. Do not touch.
|
||||
public static boolean OldSeekbarThumbnailsDefaultBoolean() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -6,6 +6,8 @@ import static app.revanced.extension.shared.utils.Utils.isSDKAbove;
|
||||
import android.preference.Preference;
|
||||
import android.preference.SwitchPreference;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import app.revanced.extension.shared.settings.Setting;
|
||||
import app.revanced.extension.youtube.patches.general.ChangeFormFactorPatch;
|
||||
import app.revanced.extension.youtube.patches.utils.PatchStatus;
|
||||
@ -44,6 +46,7 @@ public class ReVancedSettingsPreference extends ReVancedPreferenceFragment {
|
||||
AmbientModePreferenceLinks();
|
||||
FullScreenPanelPreferenceLinks();
|
||||
NavigationPreferenceLinks();
|
||||
PatchInformationPreferenceLinks();
|
||||
RYDPreferenceLinks();
|
||||
SeekBarPreferenceLinks();
|
||||
ShortsPreferenceLinks();
|
||||
@ -143,6 +146,26 @@ public class ReVancedSettingsPreference extends ReVancedPreferenceFragment {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set patch information preference summary
|
||||
*/
|
||||
private static void PatchInformationPreferenceLinks() {
|
||||
Preference appNamePreference = mPreferenceManager.findPreference("revanced_app_name");
|
||||
if (appNamePreference != null) {
|
||||
appNamePreference.setSummary(ExtendedUtils.getAppLabel());
|
||||
}
|
||||
Preference appVersionPreference = mPreferenceManager.findPreference("revanced_app_version");
|
||||
if (appVersionPreference != null) {
|
||||
appVersionPreference.setSummary(ExtendedUtils.getAppVersionName());
|
||||
}
|
||||
Preference patchedDatePreference = mPreferenceManager.findPreference("revanced_patched_date");
|
||||
if (patchedDatePreference != null) {
|
||||
long patchedTime = PatchStatus.PatchedTime();
|
||||
Date date = new Date(patchedTime);
|
||||
patchedDatePreference.setSummary(date.toLocaleString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable/Disable Preference related to RYD settings
|
||||
*/
|
||||
|
Reference in New Issue
Block a user