Commit 5d8e4a51 authored by Lucas Braz Cunha's avatar Lucas Braz Cunha

Issue AGILE#198 Minor changes: code refactoring

Signed-off-by: Lucas Braz Cunha's avatarLucas B. Cunha <lbc16@inf.ufpr.br>
parent a0943d82
......@@ -92,12 +92,6 @@ public class SchedulingActivity extends AppCompatActivity implements SchedulingV
private UserOutput citizen;
private List<SectorInput> sectors;
private List<ServiceLocation> serviceLocations;
private List<ServiceType> serviceTypes;
private ServiceTypeSpinnerListener serviceTypeSpinnerListener;
private LocationSpinnerListener locationSpinnerListener;
......@@ -157,7 +151,7 @@ public class SchedulingActivity extends AppCompatActivity implements SchedulingV
setContentView(R.layout.activity_scheduling);
Bundle bundle = getIntent().getBundleExtra(Utils.SECTORS_CITIZENS_BUNDLE);
sectors = bundle.getParcelableArrayList(Utils.SECTORS_LIST);
List<SectorInput> sectors = bundle.getParcelableArrayList(Utils.SECTORS_LIST);
citizen = bundle.getParcelable(Utils.CITIZEN);
Toolbar toolbar = (Toolbar) findViewById(R.id.agendador_toolbar);
......@@ -457,7 +451,7 @@ public class SchedulingActivity extends AppCompatActivity implements SchedulingV
List<ServiceSchedule> schedulesList = listOfScheduleDays.get(spnr_location.getSelectedItemPosition()).get(dateFormat.format(date.getDate()));
String[] schedules = new String[schedulesList.size()];
for(int i = 0; i < schedulesList.size(); ++i){
schedules[i] = hourFormat.format(schedulesList.get(i).getStart()) + " - " + hourFormat.format(schedulesList.get(i).getEnd());
schedules[i] = hourFormat.format(schedulesList.get(i).getStart());
}
bundle.putStringArray(SCHEDULES_TIME_ARRAY, schedules);
ScheduleTimeDialogFragment scheduleTimeDialogFragment = new ScheduleTimeDialogFragment();
......@@ -495,7 +489,7 @@ public class SchedulingActivity extends AppCompatActivity implements SchedulingV
locationSpinnerListener.setUserSelect(false);
serviceTypeSpinnerListener.setUserSelect(false);
sectorSpinnerListener.setUserSelect(false);
this.serviceTypes = serviceTypes;
List<ServiceType> serviceTypes1 = serviceTypes;
serviceTypeSpinnerListener.setServiceTypes(serviceTypes);
spnr_type.setEnabled(true);
......@@ -526,7 +520,7 @@ public class SchedulingActivity extends AppCompatActivity implements SchedulingV
boolean hasCreatedDecorator2 = false;
locationSpinnerListener.setUserSelect(false);
locationSpinnerListener.setServiceLocations(serviceLocations);
this.serviceLocations = serviceLocations;
List<ServiceLocation> serviceLocations1 = serviceLocations;
for(ServiceLocation location : serviceLocations){
if(location.getmPeriod() > max)
......
......@@ -130,7 +130,7 @@ public class SchedulingPresenter extends BasePresenter<SchedulingView> {
header.put("uid", osb.getString("uid", null));
final ApiEndpoints service = ApiUtils.request(header);
Call<ScheduleConfirmation> listCall = service.requestConfirmSchedule(schedule.getmId(), citizen.getmId());
schedulingPresenter.view().setProgressBar(true, SchedulingActivity.SHOW_PB);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment