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

Commit f982344d authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

fix: Improve email handling in AccountSettings

parent b6b30feb
Loading
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -201,18 +201,17 @@ class AccountSettings(
        }

        private fun addEmailToBundle(bundle: Bundle, email: String?, userName: String?) {
            if (email != null) {
            if (!email.isNullOrEmpty() && email != "null") {
                bundle.putString(KEY_EMAIL_ADDRESS, email)
                return
            }

            userName?.let {
                if (it.contains("@")) {
                if (it != "null" && it.contains("@")) {
                    bundle.putString(KEY_EMAIL_ADDRESS, it)
                }
            }
        }

    }