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

Commit b7cef573 authored by Nihar Thakkar's avatar Nihar Thakkar
Browse files

Close activity when home menu button is clicked

parent 748a7910
Loading
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@ class LoginActivity : AppCompatActivity() {
        const val ACCOUNT_PROVIDER_EELO = "eelo"
        const val ACCOUNT_PROVIDER_GOOGLE = "google"
        const val ACCOUNT_PROVIDER_GOOGLE_AUTH_COMPLETE = "google_auth_complete"
        const val ACCOUNT_PROVIDER_EELO_AUTH_COMPLETE = "eelo_auth_complete"
    }


@@ -77,6 +76,16 @@ class LoginActivity : AppCompatActivity() {
        return true
    }

    override fun onOptionsItemSelected(item: MenuItem?): Boolean {
        when {
            item?.itemId == android.R.id.home -> {
                finish()
                return true
            }
        }
        return false
    }


    fun showHelp(item: MenuItem) {
        startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.login_help_url))))