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:
Peter Vacho 2024-12-30 00:13:53 +01:00
parent e481bb70fc
commit a416f1cfda
Signed by: school
GPG key ID: 8CFC3837052871B4

View file

@ -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()