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

Commit fa0f7cb0 authored by Nihar Thakkar's avatar Nihar Thakkar Committed by Sumit Pundir
Browse files

Close activity when home menu button is clicked

parent d57dbdf6
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -48,7 +48,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"
    }

    private val loginFragmentLoader = ServiceLoader.load(ILoginCredentialsFragment::class.java)!!
@@ -91,6 +90,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) {
        UiUtils.launchUri(this,
                App.homepageUrl(this).buildUpon().appendPath("tested-with").build())