From f1518557c088a4fa7247dcfd992b062c9dc3523c Mon Sep 17 00:00:00 2001 From: Chumva Date: Thu, 14 Feb 2019 12:53:47 +0200 Subject: [PATCH] Add check for empty editText --- .../src/net/osmand/telegram/ui/LoginDialogFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/LoginDialogFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/LoginDialogFragment.kt index 3a71b30194..0bfc63e15c 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/LoginDialogFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/LoginDialogFragment.kt @@ -319,7 +319,7 @@ class LoginDialogFragment : BaseDialogFragment() { layout.visibility = View.VISIBLE val editText: ExtendedEditText? = layout.findViewById(t.editorId) if (editText != null && !showWelcomeDialog) { - if (loginDialogActiveType == LoginDialogType.ENTER_PHONE_NUMBER) { + if (loginDialogActiveType == LoginDialogType.ENTER_PHONE_NUMBER && editText.text.isEmpty()) { editText.setText(countryPhoneCode) } editText.setOnEditorActionListener { _, actionId, _ ->