commit ec12980571f5e53aa503d2a49f41a48f260351a5
parent 72cfd7a8bce2cd3c52764af99e8377be7cca77ec
Author: rhunk <101876869+rhunk@users.noreply.github.com>
Date: Mon, 4 Mar 2024 17:04:42 +0100
fix(core): old bitmoji selfie
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/ui/OldBitmojiSelfie.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/ui/OldBitmojiSelfie.kt
@@ -15,6 +15,9 @@ class OldBitmojiSelfie : Feature("OldBitmojiSelfie", loadParams = FeatureLoadPar
if (urlPrefixes.firstOrNull { event.url.startsWith(it) } == null) return@subscribe
event.url = event.url.replace("ua=1", "") // replace ua=1 with nothing for old 3d selfies/background
+ if (oldBitmojiSelfie == "2d" && event.url.contains("ua=")) {
+ event.url = event.url.replace(Regex("ua=[^&]+"), "ua=0")
+ }
// replace with old 2d selfies
if (oldBitmojiSelfie == "2d" && event.url.contains("trim=circle")) {
val bitmojiPath = event.url.substringAfterLast("/").substringBeforeLast("?")