roomにclassIdフィールドの追加、

firestoreがclassIdを基準に受け取るように変更、
FirestoreReceptionを呼び出すタイミングを他のアクティビティから戻ってきたタイミングに変更
This commit is contained in:
nemukemo 2024-06-28 10:38:49 +09:00
parent 4a873ffd39
commit 28afc982a7
2 changed files with 2 additions and 3 deletions

View File

@ -175,7 +175,7 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
CountDownLatch latch = new CountDownLatch(2);
// タスク1: ローカルDBから生徒数を取得
// タスク1: ローカルDBから生徒数を取得してtotalStudentと比較
executor.execute(() -> {
AppDatabase db = Room.databaseBuilder(getApplicationContext(), AppDatabase.class, "SetUpTable").build();
SetUpTableDao setUpTableDao = db.setUpTableDao();
@ -194,7 +194,7 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
});
});
// タスク2: Firestoreからデータを取得
// タスク2: ルート作成を行う
executor.execute(() -> {
List<MyDataClass> myDataList = firestoreReception.getMyDataList();
CreateRoot createRoot = new CreateRoot(MainActivity.this);

View File

@ -16,7 +16,6 @@ public class SetUpTable {
public String endBreakTime;
public int totalStudent;
//TODO: ここのコードをあとで実装するroomにint classIdの作成
int classId;