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

Commit c3ecebe6 authored by Sayantan Roychowdhury's avatar Sayantan Roychowdhury
Browse files

move gplay login request to a different method

parent 38d2f736
Loading
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -131,7 +131,17 @@ class MainActivity : AppCompatActivity() {

        observeEvents()

        gPlayLoginRequested = intent.getBooleanExtra(Constants.REQUEST_GPLAY_LOGIN, false)
        checkGPlayLoginRequest(intent)
    }

    override fun onNewIntent(intent: Intent?) {
        super.onNewIntent(intent)
        checkGPlayLoginRequest(intent)
    }

    private fun checkGPlayLoginRequest(intent: Intent?) {
        gPlayLoginRequested =
            intent?.getBooleanExtra(Constants.REQUEST_GPLAY_LOGIN, false) ?: false

        if (!gPlayLoginRequested) return
        if (!viewModel.getTocStatus()) return