diff --git a/app/src/main/java/com/example/nemophila/LoginActivity.java b/app/src/main/java/com/example/nemophila/LoginActivity.java index c3bdf20..18169eb 100644 --- a/app/src/main/java/com/example/nemophila/LoginActivity.java +++ b/app/src/main/java/com/example/nemophila/LoginActivity.java @@ -37,6 +37,7 @@ if ((nemophila.getUid() != null) && (nemophila.getToken() != null)){ Intent intent = new Intent(LoginActivity.this,MainActivity.class); startActivity(intent); + return; } //通信の初期化 @@ -65,10 +66,12 @@ if (response.isSuccessful()) { System.out.println("通信成功:changeBelongsAndMaster"); + //nemophila(自端末)にname,id,tokenを記憶 nemophila.setName(response.body().getName()); nemophila.setUid(response.body().getId()); nemophila.setToken(response.body().getToken()); + //mainに画面遷移 Intent intent = new Intent(LoginActivity.this,MainActivity.class); startActivity(intent); } else {