mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 21:33:53 +01:00
Enhancement Nearby banner shows Item without image
This commit is contained in:
parent
1948bab873
commit
dfa3417d41
1 changed files with 8 additions and 1 deletions
|
|
@ -17,6 +17,7 @@ import android.hardware.SensorEvent;
|
|||
import android.hardware.SensorEventListener;
|
||||
import android.hardware.SensorManager;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
|
|
@ -538,7 +539,13 @@ public class ContributionsFragment
|
|||
|
||||
private void updateNearbyNotification(@Nullable NearbyController.NearbyPlacesInfo nearbyPlacesInfo) {
|
||||
if (nearbyPlacesInfo != null && nearbyPlacesInfo.placeList != null && nearbyPlacesInfo.placeList.size() > 0) {
|
||||
Place closestNearbyPlace = nearbyPlacesInfo.placeList.get(0);
|
||||
Place closestNearbyPlace =null;
|
||||
for (Place place : nearbyPlacesInfo.placeList) {
|
||||
if (place.pic.equals("")) {
|
||||
closestNearbyPlace = place;
|
||||
break;
|
||||
}
|
||||
}
|
||||
String distance = formatDistanceBetween(curLatLng, closestNearbyPlace.location);
|
||||
closestNearbyPlace.setDistance(distance);
|
||||
direction = (float) computeBearing(curLatLng, closestNearbyPlace.location);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue