Skip to content

Commit f840b7e

Browse files
Only set urlEditText.doOnTextChanged { … } listener once
1 parent 2367e78 commit f840b7e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

+3-4
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ class InsertLinkDialog @Inject constructor(
5757
resetDialogState()
5858
setConfirmButtonListener(dialog)
5959
}
60+
urlEditText.doOnTextChanged { _, _, _, _ ->
61+
urlLayout.setError(null)
62+
}
6063
}
6164
}
6265

@@ -112,10 +115,6 @@ class InsertLinkDialog @Inject constructor(
112115
urlLayout.setError(activityContext.getString(R.string.snackbarInvalidUrl))
113116
}
114117
}
115-
116-
urlEditText.doOnTextChanged { _, _, _, _ ->
117-
urlLayout.setError(null)
118-
}
119118
}
120119

121120
private fun addMissingHttpsProtocol(link: String): String {

0 commit comments

Comments
 (0)