fix: Add an early return if login check fails
Previously, even after redirecting to the login activity on failed login check, the code in the initialize function kept running, eventually getting to the function that navigates to the calendar activity, bypassing login.
This commit is contained in:
parent
e481bb70fc
commit
a416f1cfda
|
@ -35,12 +35,13 @@ class MainActivity : AppCompatActivity() {
|
|||
// The reachability interceptor will already redirect us to the
|
||||
// ApiUnreachableActivity, finish this one.
|
||||
finish()
|
||||
return;
|
||||
return
|
||||
}
|
||||
|
||||
loggedIn = checkUserLogin()
|
||||
if (!loggedIn) {
|
||||
navigateToLoginActivity()
|
||||
return
|
||||
}
|
||||
|
||||
navigateToCalendarActivity()
|
||||
|
|
Loading…
Reference in a new issue