コード整形

This commit is contained in:
it232115 2024-06-28 10:08:29 +09:00
parent d98293a80d
commit 56d54192d2
5 changed files with 32 additions and 30 deletions

View File

@ -111,8 +111,6 @@ public class CreateRoot {
}
private void setData(List<MyDataClass> myDataList) {
for (int i = 0; i < myDataList.size(); i++) {
// 希望時間帯の終了時刻から開始時刻を引いて希望時間帯の長さ(timezone)に入れる

View File

@ -11,7 +11,6 @@ import com.google.firebase.firestore.QueryDocumentSnapshot;
import com.google.firebase.firestore.QuerySnapshot;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -72,10 +71,12 @@ public class FirestoreReception {
});
}
//Dataのリストのサイズを返す
public int getMyDataListSize() {
return myDataList.size();
}
//Dataのリストを返す
public List<MyDataClass> getMyDataList() {
return myDataList;

View File

@ -131,11 +131,11 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
} else {
latch.countDown();
}
});
});
executor.execute(() -> {
List<MyDataClass> myDataList = null;
while (myDataList == null) {
myDataList = firestoreReception.getMyDataList();
@ -150,6 +150,7 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
CreateRoot createRoot = new CreateRoot(MainActivity.this);
Boolean notDuplicates=createRoot.receiveData(myDataList);
latch.countDown();
if(notDuplicates){
Log.d("MainActivity","スケジュール作成成功");
}else{
@ -221,6 +222,7 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
public void onClick(DialogInterface dialog, int which) {
latch.countDown();
}
})
.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
@Override

View File

@ -206,6 +206,7 @@ public class MyDataClass {
public void setSecondDayEndDateString(String secondDayEndDateString) {
this.secondDayEndDateString = secondDayEndDateString;
}
public void setSecondDayTimezone(Long secondDayTimezone) {
this.secondDayTimezone = secondDayTimezone;
}