mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-27 05:06:52 +02:00
Speeding up the url finder in the new post edit text.
This commit is contained in:
@@ -843,11 +843,7 @@ open class NewPostViewModel() : ViewModel() {
|
||||
}
|
||||
|
||||
open fun findUrlInMessage(): String? {
|
||||
return message.text.split('\n').firstNotNullOfOrNull { paragraph ->
|
||||
paragraph.split(' ').firstOrNull { word: String ->
|
||||
RichTextParser.isValidURL(word) || RichTextParser.isUrlWithoutScheme(word)
|
||||
}
|
||||
}
|
||||
return RichTextParser().parseValidUrls(message.text).firstOrNull()
|
||||
}
|
||||
|
||||
open fun removeFromReplyList(userToRemove: User) {
|
||||
|
Reference in New Issue
Block a user