Adds checks for the main thread when parsing NIP30
This commit is contained in:
@@ -6,6 +6,8 @@ class NIP30Parser {
|
||||
val customEmojiPattern: Pattern = Pattern.compile("\\:([A-Za-z0-9_\\-]+)\\:", Pattern.CASE_INSENSITIVE)
|
||||
|
||||
fun buildArray(input: String): List<String> {
|
||||
checkNotInMainThread()
|
||||
|
||||
val matcher = customEmojiPattern.matcher(input)
|
||||
val list = mutableListOf<String>()
|
||||
while (matcher.find()) {
|
||||
|
||||
Reference in New Issue
Block a user