Skip to content

Commit 16f5d13

Browse files
committed
Correctly reset the insert dialog edit text states when opening the dialog again
1 parent 98cdb50 commit 16f5d13

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

+6-1
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,17 @@ class InsertLinkDialog @Inject constructor(
5555
.also {
5656
it.setOnShowListener { dialog ->
5757
displayNameEditText.showKeyboard()
58-
urlLayout.setError(null)
58+
resetDialogState()
5959
setConfirmButtonListener(dialog)
6060
}
6161
}
6262
}
6363

64+
private fun resetDialogState() {
65+
binding.urlLayout.setError(null)
66+
hidePlaceholder()
67+
}
68+
6469
private fun setConfirmButtonListener(dialog: DialogInterface) = with(binding) {
6570
(dialog as AlertDialog).getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
6671
val url = addMissingHttpsProtocol(urlEditText.trimmedText)

0 commit comments

Comments
 (0)