Speeding up the loop through local cache.
This commit is contained in:
@@ -33,11 +33,14 @@ class Lud06 {
|
||||
val url = toLnUrlp(str)
|
||||
|
||||
val matcher = LNURLP_PATTERN.matcher(url)
|
||||
matcher.find()
|
||||
val domain = matcher.group(2)
|
||||
val username = matcher.group(3)
|
||||
if (matcher.find()) {
|
||||
val domain = matcher.group(2)
|
||||
val username = matcher.group(3)
|
||||
|
||||
"$username@$domain"
|
||||
"$username@$domain"
|
||||
} else {
|
||||
null
|
||||
}
|
||||
} catch (t: Throwable) {
|
||||
t.printStackTrace()
|
||||
Log.w("Lud06ToLud16", "Fail to convert LUD06 to LUD16", t)
|
||||
|
||||
@@ -207,6 +207,8 @@ open class Event(
|
||||
|
||||
override fun isExpired() = (expiration() ?: Long.MAX_VALUE) < TimeUtils.now()
|
||||
|
||||
override fun isExpirationBefore(time: Long) = (expiration() ?: Long.MAX_VALUE) < time
|
||||
|
||||
override fun getTagOfAddressableKind(kind: Int): ATag? {
|
||||
val kindStr = kind.toString()
|
||||
val aTag =
|
||||
|
||||
@@ -137,5 +137,7 @@ interface EventInterface {
|
||||
|
||||
fun isExpired(): Boolean
|
||||
|
||||
fun isExpirationBefore(time: Long): Boolean
|
||||
|
||||
fun hasZapSplitSetup(): Boolean
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user