From c65f642074f34dd5b4ff5866043566db733df40e Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Wed, 27 Nov 2024 13:10:22 +0400 Subject: [PATCH] chore: Fix spoof version setting migration Previously this failed because of cyclic initialization of the settings and the spoof version patch --- .../java/app/revanced/extension/youtube/settings/Settings.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/extensions/shared/src/main/java/app/revanced/extension/youtube/settings/Settings.java b/extensions/shared/src/main/java/app/revanced/extension/youtube/settings/Settings.java index 9b7232368..e12cdf258 100644 --- a/extensions/shared/src/main/java/app/revanced/extension/youtube/settings/Settings.java +++ b/extensions/shared/src/main/java/app/revanced/extension/youtube/settings/Settings.java @@ -20,7 +20,6 @@ import app.revanced.extension.youtube.patches.AlternativeThumbnailsPatch.StillIm import app.revanced.extension.youtube.patches.AlternativeThumbnailsPatch.ThumbnailOption; import app.revanced.extension.youtube.patches.AlternativeThumbnailsPatch.ThumbnailStillTime; import app.revanced.extension.youtube.patches.spoof.ClientType; -import app.revanced.extension.youtube.patches.spoof.SpoofAppVersionPatch; import app.revanced.extension.youtube.patches.spoof.SpoofVideoStreamsPatch; import app.revanced.extension.youtube.sponsorblock.SponsorBlockSettings; @@ -380,7 +379,7 @@ public class Settings extends BaseSettings { migrateOldSettingToNew(DEPRECATED_HIDE_PLAYER_FLYOUT_VIDEO_QUALITY_FOOTER, HIDE_PLAYER_FLYOUT_VIDEO_QUALITY_FOOTER); // Old spoof versions that no longer work reliably. - if (SpoofAppVersionPatch.isSpoofingToLessThan(SPOOF_APP_VERSION_TARGET.defaultValue)) { + if (SPOOF_APP_VERSION_TARGET.get().compareTo(SPOOF_APP_VERSION_TARGET.defaultValue) < 0) { Logger.printInfo(() -> "Resetting spoof app version target"); SPOOF_APP_VERSION_TARGET.resetToDefault(); }