order time fix
This commit is contained in:
@@ -477,7 +477,7 @@ public class CreateOrderSummaryFragment extends CreateOrderBaseFragment {
|
|||||||
dateOfOrder.get(Calendar.DAY_OF_MONTH) == nowDate.get(Calendar.DAY_OF_MONTH);
|
dateOfOrder.get(Calendar.DAY_OF_MONTH) == nowDate.get(Calendar.DAY_OF_MONTH);
|
||||||
|
|
||||||
if(isTheSameDate && isChoosingDeliveyTimeForFreeShipping){
|
if(isTheSameDate && isChoosingDeliveyTimeForFreeShipping){
|
||||||
nowDate.add( Calendar.MINUTE, 75);
|
nowDate.add( Calendar.MINUTE, 65);
|
||||||
}
|
}
|
||||||
// createOrderActivity.getSelectedShippingMethod().getCode().equalsIgnoreCase(ApiConstants.SHIPPING_METHOD_CODE_PICK_UP_FROM_STORE)
|
// createOrderActivity.getSelectedShippingMethod().getCode().equalsIgnoreCase(ApiConstants.SHIPPING_METHOD_CODE_PICK_UP_FROM_STORE)
|
||||||
else if(isTheSameDate){
|
else if(isTheSameDate){
|
||||||
@@ -562,11 +562,27 @@ public class CreateOrderSummaryFragment extends CreateOrderBaseFragment {
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
timePickerDialog.setSelectableTimes(generateEnabledTimePoints(workingParts));
|
|
||||||
|
Timepoint[] enabledTimePoints = generateEnabledTimePoints(workingParts);
|
||||||
|
timePickerDialog.setSelectableTimes(enabledTimePoints);
|
||||||
timePickerDialog.vibrate(false);
|
timePickerDialog.vibrate(false);
|
||||||
|
|
||||||
if(isTheSameDate){
|
if(isTheSameDate){
|
||||||
timePickerDialog.setMinTime(nowHour, nowMinute, nowSecond);
|
boolean isMinimumTimeInTimePoints = false;
|
||||||
|
for(Timepoint timepoint : enabledTimePoints){
|
||||||
|
if(timepoint.getHour() == nowHour && timepoint.getMinute() == nowMinute){
|
||||||
|
isMinimumTimeInTimePoints = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isMinimumTimeInTimePoints){
|
||||||
|
timePickerDialog.setMinTime(nowHour, nowMinute, nowSecond);
|
||||||
|
}
|
||||||
|
else if(enabledTimePoints.length > 0) {
|
||||||
|
timePickerDialog.setMinTime(enabledTimePoints[0].getHour(), enabledTimePoints[0].getMinute(), nowSecond);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
timePickerDialog.show(BaseActivity.currentActivity.getFragmentManager(), choosetext);
|
timePickerDialog.show(BaseActivity.currentActivity.getFragmentManager(), choosetext);
|
||||||
|
|||||||
Reference in New Issue
Block a user