mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
* fix issue with "nearby place found" pop up on nearby upload * added javadoc Co-authored-by: Pratham2305 <Pratham2305@users.noreply.github.com>
This commit is contained in:
parent
2b62d8487b
commit
c7f7b39151
2 changed files with 13 additions and 2 deletions
|
|
@ -18,7 +18,7 @@ public class UploadItem {
|
|||
private final String mimeType;
|
||||
private ImageCoordinates gpsCoords;
|
||||
private List<UploadMediaDetail> uploadMediaDetails;
|
||||
private final Place place;
|
||||
private Place place;
|
||||
private final long createdTimestamp;
|
||||
private final String createdTimestampSource;
|
||||
private final BehaviorSubject<Integer> imageQuality;
|
||||
|
|
@ -70,6 +70,14 @@ public class UploadItem {
|
|||
this.imageQuality.onNext(imageQuality);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the corresponding place to the uploadItem
|
||||
* @param place geolocated Wikidata item
|
||||
*/
|
||||
public void setPlace(Place place) {
|
||||
this.place = place;
|
||||
}
|
||||
|
||||
public Place getPlace() {
|
||||
return place;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ public class UploadMediaPresenter implements UserActionListener, SimilarImageInt
|
|||
gpsCoords != null && gpsCoords.getImageCoordsExists();
|
||||
view.showMapWithImageCoordinates(hasImageCoordinates);
|
||||
view.showProgress(false);
|
||||
if (hasImageCoordinates) {
|
||||
if (hasImageCoordinates && place == null) {
|
||||
checkNearbyPlaces(uploadItem);
|
||||
}
|
||||
},
|
||||
|
|
@ -194,6 +194,9 @@ public class UploadMediaPresenter implements UserActionListener, SimilarImageInt
|
|||
final List<UploadMediaDetail> uploadMediaDetails = repository.getUploads()
|
||||
.get(uploadItemPosition)
|
||||
.getUploadMediaDetails();
|
||||
UploadItem uploadItem = repository.getUploads()
|
||||
.get(uploadItemPosition);
|
||||
uploadItem.setPlace(place);
|
||||
uploadMediaDetails.set(0, new UploadMediaDetail(place));
|
||||
view.updateMediaDetails(uploadMediaDetails);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue