Skip to content

Commit 5b37700

Browse files
KevinBoulongneLunarX
authored andcommitted
Oneline validate method for link insertion
1 parent 615c296 commit 5b37700

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

app/src/main/java/com/infomaniak/mail/ui/newMessage/InsertLinkDialog.kt

+1-3
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,7 @@ class InsertLinkDialog @Inject constructor(
128128
return "https://$strippedUserInput"
129129
}
130130

131-
private fun validate(userUrlInput: String): Boolean {
132-
return Patterns.WEB_URL.matcher(userUrlInput).matches()
133-
}
131+
private fun validate(userUrlInput: String): Boolean = Patterns.WEB_URL.matcher(userUrlInput).matches()
134132

135133
companion object {
136134
private const val PROTOCOL_SEPARATOR = "://"

0 commit comments

Comments
 (0)