diff --git a/OsmAnd-telegram/res/values/strings.xml b/OsmAnd-telegram/res/values/strings.xml index 000347d4cb..df92fd08ea 100644 --- a/OsmAnd-telegram/res/values/strings.xml +++ b/OsmAnd-telegram/res/values/strings.xml @@ -1,211 +1,256 @@ - 32,BE - 501,BZ - 229,BJ - 975,BT - 591,BO - 387,BA - 267,BW - 55,BR - 673,BN - 359,BG - 226,BF - 95,MM - 257,BI - 855,KH - 237,CM - 1,CA - 238,CV - 236,CF - 235,TD - 56,CL - 86,CN - 61,CX - 61,CC - 57,CO - 269,KM - 242,CG - 243,CD - 682,CK - 506,CR - 385,HR - 53,CU - 357,CY - 93,AF - 355,AL - 213,DZ - 376,AD - 244,AO - 672,AQ - 54,AR - 374,AM - 297,AW - 61,AU - 43,AT - 994,AZ - 973,BH - 880,BD - 375,BY - 420,CZ - 45,DK - 253,DJ - 670,TL - 593,EC - 20,EG - 503,SV - 240,GQ - 358,FI - 33,FR - 291,ER - 372,EE - 251,ET - 500,FK - 298,FO - 679,FJ - 689,PF - 241,GA - 220,GM - 995,GE - 49,DE - 233,GH - 350,GI - 30,GR - 299,GL - 502,GT - 224,GN - 245,GW - 592,GY - 509,HT - 504,HN - 852,HK - 36,HU - 91,IN - 62,ID - 98,IR - 964,IQ - 353,IE - 44,IM - 972,IL - 39,IT - 225,CI - 81,JP - 962,JO - 7,KZ - 254,KE - 686,KI - 965,KW - 996,KG - 856,LA - 371,LV - 961,LB - 266,LS - 231,LR - 218,LY - 423,LI - 370,LT - 352,LU - 853,MO - 389,MK - 261,MG - 265,MW - 60,MY - 960,MV - 223,ML - 356,MT - 692,MH - 222,MR - 230,MU - 262,YT - 52,MX - 691,FM - 373,MD - 377,MC - 976,MN - 382,ME - 212,MA - 258,MZ - 264,NA - 674,NR - 977,NP - 31,NL - 599,AN - 687,NC - 64,NZ - 505,NI - 227,NE - 234,NG - 683,NU - 850,KP - 47,NO - 968,OM - 92,PK - 680,PW - 507,PA - 675,PG - 595,PY - 51,PE - 63,PH - 870,PN - 48,PL - 351,PT - 1,PR - 974,QA - 40,RO - 7,RU - 250,RW - 590,BL - 685,WS - 378,SM - 239,ST - 966,SA - 221,SN - 381,RS - 248,SC - 232,SL - 65,SG - 421,SK - 386,SI - 677,SB - 252,SO - 27,ZA - 82,KR - 34,ES - 94,LK - 290,SH - 508,PM - 249,SD - 597,SR - 268,SZ - 46,SE - 41,CH - 963,SY - 886,TW - 992,TJ - 255,TZ - 66,TH - 228,TG - 690,TK - 676,TO - 216,TN - 90,TR - 993,TM - 688,TV - 971,AE - 256,UG - 44,GB - 380,UA - 598,UY - 1,US - 998,UZ - 678,VU - 39,VA - 58,VE - 84,VN - 681,WF - 967,YE - 260,ZM - 263,ZW + AB,+7840,+7940,+99544 + AF,+93 + AX,+35818 + AL,+355 + DZ,+213 + AS,+1684 + AD,+376 + AO,+244 + AI,+1264 + AG,+1268 + AR,+54 + AM,+374 + AW,+297 + SH,+247 + AU,+61 + AU,+672 + AT,+43 + AZ,+994 + BS,+1242 + BH,+973 + BD,+880 + BB,+1246 + AG,+1268 + BY,+375 + BE,+32 + BZ,+501 + BJ,+229 + BM,+1441 + BT,+975 + BO,+591 + BQ,+5997 + BA,+387 + BW,+267 + BR,+55 + IO,+246 + VG,+1284 + BN,+673 + BG,+359 + BF,+226 + MY,+95 + BI,+257 + KH,+855 + CM,+237 + CA,+1 + CV,+238 + KY,+1345 + CF,+236 + TD,+235 + CL,+56 + CN,+86 + CX,+61 + CC,+61 + CO,+57 + KM,+269 + CG,+242 + CD,+243 + CK,+682 + CR,+506 + CI,+225 + HR,+385 + CU,+53 + CW,+5999 + CY,+357 + CZ,+420 + DK,+45 + DG,+246 + DJ,+253 + DM,+1767 + DO,+1809,+1829,+1849 + TL,+670 + EC,+593 + EG,+20 + SV,+503 + GQ,+240 + ER,+291 + EE,+372 + ET,+251 + FK,+500 + FO,+298 + FJ,+679 + FI,+358 + FR,+33 + GF,+594 + PF,+689 + GA,+241 + GM,+220 + GE,+995 + DE,+49 + GH,+233 + GI,+350 + GR,+30 + GL,+299 + GD,+1473 + GP,+590 + GU,+1671 + GT,+502 + GG,+44 + GN,+224 + GW,+245 + GY,+592 + HT,+509 + HN,+504 + HK,+852 + HU,+36 + IS,+354 + IN,+91 + ID,+62 + IR,+98 + IQ,+964 + IE,+353 + IL,+972 + IT,+39 + JM,+1876 + SJ,+4779 + JP,+81 + JE,+44 + JO,+962 + KZ,+76,+77 + KE,+254 + KI,+686 + KP,+850 + KR,+82 + KW,+965 + KG,+996 + LA,+856 + LV,+371 + LB,+961 + LS,+266 + LR,+231 + LY,+218 + LI,+423 + LT,+370 + LU,+352 + MO,+853 + MK,+389 + MG,+261 + MW,+265 + MY,+60 + MV,+960 + ML,+223 + MT,+356 + MH,+692 + MQ,+596 + MR,+222 + MU,+230 + YT,+262 + MX,+52 + FM,+691 + MD,+373 + MC,+377 + MN,+976 + ME,+382 + MS,+1664 + MA,+212 + MZ,+258 + NA,+264 + NR,+674 + NP,+977 + NL,+31 + NC,+687 + NZ,+64 + NI,+505 + NE,+227 + NG,+234 + NU,+683 + NF,+672 + MP,+1670 + NO,+47 + OM,+968 + PK,+92 + PW,+680 + PS,+970 + PA,+507 + PG,+675 + PY,+595 + PE,+51 + PH,+63 + PN,+64 + PL,+48 + PT,+351 + PR,+1787,+1939 + QA,+974 + RE,+262 + RO,+40 + RU,+7 + RW,+250 + BL,+590 + SH,+290 + KN,+1869 + LC,+1758 + MF,+590 + PM,+508 + VC,+1784 + WS,+685 + SM,+378 + ST,+239 + SA,+966 + SN,+221 + RS,+381 + SC,+248 + SL,+232 + SG,+65 + BQ,+5993 + SX,+1721 + SK,+421 + SI,+386 + SB,+677 + SO,+252 + ZA,+27 + GS,+500 + !1,+99534 + SS,+211 + ES,+34 + LK,+94 + SD,+249 + SR,+597 + SJ,+4779 + SZ,+268 + SE,+46 + CH,+41 + SY,+963 + TW,+886 + TJ,+992 + TZ,+255 + TH,+66 + TG,+228 + TK,+690 + TO,+676 + TT,+1868 + TN,+216 + TR,+90 + TM,+993 + TC,+1649 + TV,+688 + UG,+256 + UA,+380 + AE,+971 + UK,+44 + US,+1 + UY,+598 + VI,+1340 + UZ,+998 + VU,+678 + VE,+58 + VA,+3906698,+379 + VN,+84 + WF,+681 + YE,+967 + ZM,+260 + !1,+255 + ZW,+263 Telegram We use a Telegram (messaging app) to connect people and make it easier for you to communicate with them. diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/LoginDialogFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/LoginDialogFragment.kt index 92d00c279e..b50000eca8 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/LoginDialogFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/LoginDialogFragment.kt @@ -56,7 +56,7 @@ class LoginDialogFragment : BaseDialogFragment() { private var softKeyboardShown: Boolean = false - private var countryPhoneCode: String = "" + private var countryPhoneCode: String = "+" fun showWelcomeDialog(fragmentManager: FragmentManager) { welcomeDialogShown = true @@ -256,7 +256,7 @@ class LoginDialogFragment : BaseDialogFragment() { val editText: ExtendedEditText? = layout.findViewById(t.editorId) if (editText != null && !showWelcomeDialog) { if (loginDialogActiveType == LoginDialogType.ENTER_PHONE_NUMBER) { - editText.setText("+$countryPhoneCode") + editText.setText(countryPhoneCode) } editText.setOnEditorActionListener { _, actionId, _ -> if (actionId == EditorInfo.IME_ACTION_DONE) { @@ -274,10 +274,10 @@ class LoginDialogFragment : BaseDialogFragment() { override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {} override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {} override fun afterTextChanged(s: Editable) { - changeContinueButtonEnabled(s.length > countryPhoneCode.length + 1) + changeContinueButtonEnabled(s.length > countryPhoneCode.length) } }) - changeContinueButtonEnabled(editText.text.length > countryPhoneCode.length + 1) + changeContinueButtonEnabled(editText.text.length > countryPhoneCode.length) editText.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16F) } @@ -475,8 +475,8 @@ class LoginDialogFragment : BaseDialogFragment() { val arrCountryCode = this.resources.getStringArray(R.array.DialingCountryCode) arrCountryCode.forEach { val arrDial = it.split(",") - if (arrDial[1].trim() == (countryId)) { - countryDialCode = arrDial[0] + if (arrDial[0].trim() == (countryId)) { + countryDialCode = arrDial[1] return countryDialCode } }