mirror of
				https://github.com/pierre42100/ComunicAndroid
				synced 2025-11-04 03:24:04 +00:00 
			
		
		
		
	Fixed an issue with the login activity.
This commit is contained in:
		@@ -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
 | 
			
		||||
     *
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user