コード整形
This commit is contained in:
parent
d98293a80d
commit
56d54192d2
|
@ -111,8 +111,6 @@ public class CreateRoot {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void setData(List<MyDataClass> myDataList) {
|
private void setData(List<MyDataClass> myDataList) {
|
||||||
for (int i = 0; i < myDataList.size(); i++) {
|
for (int i = 0; i < myDataList.size(); i++) {
|
||||||
// 希望時間帯の終了時刻から開始時刻を引いて希望時間帯の長さ(timezone)に入れる
|
// 希望時間帯の終了時刻から開始時刻を引いて希望時間帯の長さ(timezone)に入れる
|
||||||
|
|
|
@ -11,7 +11,6 @@ import com.google.firebase.firestore.QueryDocumentSnapshot;
|
||||||
import com.google.firebase.firestore.QuerySnapshot;
|
import com.google.firebase.firestore.QuerySnapshot;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -72,10 +71,12 @@ public class FirestoreReception {
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Dataのリストのサイズを返す
|
//Dataのリストのサイズを返す
|
||||||
public int getMyDataListSize() {
|
public int getMyDataListSize() {
|
||||||
return myDataList.size();
|
return myDataList.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Dataのリストを返す
|
//Dataのリストを返す
|
||||||
public List<MyDataClass> getMyDataList() {
|
public List<MyDataClass> getMyDataList() {
|
||||||
return myDataList;
|
return myDataList;
|
||||||
|
|
|
@ -131,11 +131,11 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
|
||||||
} else {
|
} else {
|
||||||
latch.countDown();
|
latch.countDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
executor.execute(() -> {
|
executor.execute(() -> {
|
||||||
|
|
||||||
List<MyDataClass> myDataList = null;
|
List<MyDataClass> myDataList = null;
|
||||||
while (myDataList == null) {
|
while (myDataList == null) {
|
||||||
myDataList = firestoreReception.getMyDataList();
|
myDataList = firestoreReception.getMyDataList();
|
||||||
|
@ -150,6 +150,7 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
|
||||||
CreateRoot createRoot = new CreateRoot(MainActivity.this);
|
CreateRoot createRoot = new CreateRoot(MainActivity.this);
|
||||||
Boolean notDuplicates=createRoot.receiveData(myDataList);
|
Boolean notDuplicates=createRoot.receiveData(myDataList);
|
||||||
latch.countDown();
|
latch.countDown();
|
||||||
|
|
||||||
if(notDuplicates){
|
if(notDuplicates){
|
||||||
Log.d("MainActivity","スケジュール作成成功");
|
Log.d("MainActivity","スケジュール作成成功");
|
||||||
}else{
|
}else{
|
||||||
|
@ -221,6 +222,7 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
latch.countDown();
|
latch.countDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
|
.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -206,6 +206,7 @@ public class MyDataClass {
|
||||||
public void setSecondDayEndDateString(String secondDayEndDateString) {
|
public void setSecondDayEndDateString(String secondDayEndDateString) {
|
||||||
this.secondDayEndDateString = secondDayEndDateString;
|
this.secondDayEndDateString = secondDayEndDateString;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSecondDayTimezone(Long secondDayTimezone) {
|
public void setSecondDayTimezone(Long secondDayTimezone) {
|
||||||
this.secondDayTimezone = secondDayTimezone;
|
this.secondDayTimezone = secondDayTimezone;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user