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? {
|
open fun findUrlInMessage(): String? {
|
||||||
return message.text.split('\n').firstNotNullOfOrNull { paragraph ->
|
return RichTextParser().parseValidUrls(message.text).firstOrNull()
|
||||||
paragraph.split(' ').firstOrNull { word: String ->
|
|
||||||
RichTextParser.isValidURL(word) || RichTextParser.isUrlWithoutScheme(word)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
open fun removeFromReplyList(userToRemove: User) {
|
open fun removeFromReplyList(userToRemove: User) {
|
||||||
|
|||||||
Reference in New Issue
Block a user