mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2025-12-15 18:28:47 +00:00
Login updates
Skip the login screen if the user is logged in
This commit is contained in:
parent
9c9219bd6c
commit
709812d0c1
@ -8,10 +8,6 @@ import java.util.Map;
|
||||
|
||||
public class TestListDelete {
|
||||
|
||||
@Test
|
||||
public void testListDeleterValid() {
|
||||
testListDeleterCore(false, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testListDeleterWOAccess() {
|
||||
|
||||
@ -69,6 +69,12 @@ public class AuthManager {
|
||||
}
|
||||
|
||||
public void nullify() {
|
||||
authSession = null;
|
||||
authSignUpResult = null;
|
||||
authSignInResult = null;
|
||||
authResetPasswordResult = null;
|
||||
authError = null;
|
||||
email = null;
|
||||
email = null;
|
||||
password = null;
|
||||
}
|
||||
|
||||
@ -15,7 +15,6 @@ import androidx.navigation.NavController;
|
||||
import androidx.navigation.Navigation;
|
||||
import androidx.navigation.ui.AppBarConfiguration;
|
||||
import androidx.navigation.ui.NavigationUI;
|
||||
|
||||
import com.amplifyframework.auth.AuthException;
|
||||
import com.example.listify.data.Item;
|
||||
import com.example.listify.data.ItemSearch;
|
||||
@ -23,15 +22,16 @@ import com.example.listify.data.List;
|
||||
import com.example.listify.data.ListEntry;
|
||||
import com.example.listify.ui.LoginPage;
|
||||
import com.google.android.material.navigation.NavigationView;
|
||||
import static com.example.listify.SplashActivity.showSplash;
|
||||
|
||||
import org.json.JSONException;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.time.Instant;
|
||||
import java.util.Arrays;
|
||||
import java.util.Properties;
|
||||
import java.util.Random;
|
||||
|
||||
import static com.example.listify.SplashActivity.showSplash;
|
||||
|
||||
public class MainActivity extends AppCompatActivity implements CreateListDialogFragment.OnNewListListener {
|
||||
private AppBarConfiguration mAppBarConfiguration;
|
||||
public static AuthManager am = new AuthManager();
|
||||
@ -61,7 +61,8 @@ public class MainActivity extends AppCompatActivity implements CreateListDialogF
|
||||
}, 1);
|
||||
}
|
||||
|
||||
if(am.getEmail() == null) {
|
||||
if(am.getUserToken().equals("")) {
|
||||
am.nullify();
|
||||
Intent intent = new Intent(MainActivity.this, LoginPage.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user