mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-05 19:08:23 +00:00
Don't try to url decode for android apps
This commit is contained in:
@@ -69,7 +69,11 @@ data class BunkerMetadata(
|
||||
}
|
||||
|
||||
object IntentUtils {
|
||||
fun decodeData(data: String, replace: Boolean = true): String {
|
||||
fun decodeData(data: String, replace: Boolean = true, decodeData: Boolean = true): String {
|
||||
if (!decodeData) {
|
||||
if (!replace) return data.replace("nostrsigner:", "")
|
||||
return data.replace("nostrsigner:", "").replace("+", "%2b")
|
||||
}
|
||||
if (!replace) return URLDecoder.decode(data.replace("nostrsigner:", ""), "utf-8")
|
||||
return URLDecoder.decode(data.replace("nostrsigner:", "").replace("+", "%2b"), "utf-8")
|
||||
}
|
||||
@@ -296,7 +300,7 @@ object IntentUtils {
|
||||
|
||||
val data =
|
||||
try {
|
||||
decodeData(intent.data?.toString() ?: "", packageName == null)
|
||||
decodeData(intent.data?.toString() ?: "", packageName == null, packageName == null)
|
||||
} catch (e: Exception) {
|
||||
intent.data?.toString()?.replace("nostrsigner:", "") ?: ""
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ zxingAndroidEmbedded = "4.3.0"
|
||||
okhttp = "5.0.0-alpha.14"
|
||||
kotlin = "2.1.10"
|
||||
workRuntimeKtx = "2.10.0"
|
||||
agp = "8.8.0"
|
||||
agp = "8.8.1"
|
||||
ktlint = "12.1.2"
|
||||
ksp = "2.1.10-1.0.29"
|
||||
coil = "3.0.4"
|
||||
|
||||
Reference in New Issue
Block a user