Fix location control set hasChanges

pull/757/head
Alex Baker 6 years ago
parent 0e32ddaf54
commit 7f58aae005

@ -79,15 +79,14 @@ public class LocationControlSet extends TaskEditControlFragment {
taskId = task.getId(); taskId = task.getId();
if (savedInstanceState == null) { if (savedInstanceState == null) {
setup(geofenceService.getGeofences(taskId)); locations.addAll(geofenceService.getGeofences(taskId));
} else { } else {
List<Location> locations = new ArrayList<>();
List<Parcelable> geofenceArray = savedInstanceState.getParcelableArrayList(EXTRA_GEOFENCES); List<Parcelable> geofenceArray = savedInstanceState.getParcelableArrayList(EXTRA_GEOFENCES);
for (Parcelable geofence : geofenceArray) { for (Parcelable geofence : geofenceArray) {
locations.add((Location) geofence); locations.add((Location) geofence);
} }
setup(locations);
} }
setup(locations);
return view; return view;
} }

Loading…
Cancel
Save