Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 71174766 authored by Vincent Bourgmayer's avatar Vincent Bourgmayer Committed by Nihar Thakkar
Browse files

Clean preload custom url from mail

parent bfdcd415
Loading
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -47,6 +47,17 @@ class EeloAuthenticatorFragment : Fragment() {
        val view = inflater.inflate(R.layout.fragment_eelo_authenticator, container, false)

        view.urlpwd_other_account_title_panel.setOnClickListener(){ expandCollapse() }
        view.urlpwd_user_name.setOnFocusChangeListener() { v, hasFocus ->
            if (!hasFocus ) {
                if (v.urlpwd_user_name.text.toString().contains("@")) {
                    val dns = v.urlpwd_user_name.text.toString().substringAfter("@")
                    val pre_custom_url = "https://" + dns
                    view.urlpwd_server_uri.setText(pre_custom_url)
                } else {
                    view.urlpwd_server_uri.setText("")
                }
            }
        }

        view.login.setOnClickListener { login() }