mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2024-11-23 13:59:29 +00:00
Fixed an issue with the login activity.
This commit is contained in:
parent
226404a2c4
commit
636c74bc98
@ -69,6 +69,15 @@ public class LoginActivity extends AppCompatActivity {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||
//If the user is signed in, open the main activity
|
||||
if(new AccountHelper(this).signed_in())
|
||||
openMainActivity();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle login form submission
|
||||
*/
|
||||
@ -186,8 +195,7 @@ public class LoginActivity extends AppCompatActivity {
|
||||
}
|
||||
else {
|
||||
//Redirect to the main activity
|
||||
Intent redirect = new Intent(LoginActivity.this, MainActivity.class);
|
||||
startActivity(redirect);
|
||||
openMainActivity();
|
||||
}
|
||||
|
||||
}
|
||||
@ -195,6 +203,14 @@ public class LoginActivity extends AppCompatActivity {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Open the main activity
|
||||
*/
|
||||
private void openMainActivity(){
|
||||
Intent redirect = new Intent(LoginActivity.this, MainActivity.class);
|
||||
startActivity(redirect);
|
||||
}
|
||||
|
||||
/**
|
||||
* Switch between loading state and ready state for the login form
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user