mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2024-09-29 16:30:49 +00:00
Adds checks for the main thread when parsing NIP30
This commit is contained in:
parent
7d7f047f55
commit
fbb1b59e34
@ -6,6 +6,8 @@ class NIP30Parser {
|
|||||||
val customEmojiPattern: Pattern = Pattern.compile("\\:([A-Za-z0-9_\\-]+)\\:", Pattern.CASE_INSENSITIVE)
|
val customEmojiPattern: Pattern = Pattern.compile("\\:([A-Za-z0-9_\\-]+)\\:", Pattern.CASE_INSENSITIVE)
|
||||||
|
|
||||||
fun buildArray(input: String): List<String> {
|
fun buildArray(input: String): List<String> {
|
||||||
|
checkNotInMainThread()
|
||||||
|
|
||||||
val matcher = customEmojiPattern.matcher(input)
|
val matcher = customEmojiPattern.matcher(input)
|
||||||
val list = mutableListOf<String>()
|
val list = mutableListOf<String>()
|
||||||
while (matcher.find()) {
|
while (matcher.find()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user