Skip to content

Commit

Permalink
Fixed crash when loading the mission map from the mission details screen
Browse files Browse the repository at this point in the history
  • Loading branch information
budowski committed Dec 28, 2023
1 parent 54c450b commit 4d1ea8b
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,14 @@ public Bitmap onPreSetBitmap(ImageView imageView, Bitmap loadedBitmap, String ur
public void onMapClick(LatLng latLng) {
// Show the map screen
Intent intent = new Intent(MissionDetails.this, MissionDetailsMapActivity.class);
JSONArray arr = new JSONArray(mObservations);
intent.putExtra(MissionDetailsMapActivity.OBSERVATIONS, arr.toString());

JSONArray minimizedObservations = new JSONArray();
for (int i = 0; i < mObservations.size(); i++) {
JSONObject item = mObservations.get(i);
minimizedObservations.put(ObservationUtils.getMinimalObservation(item));
}

intent.putExtra(MissionDetailsMapActivity.OBSERVATIONS, minimizedObservations.toString());
startActivity(intent);
}
});
Expand Down

0 comments on commit 4d1ea8b

Please sign in to comment.