mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 06:43:56 +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.SensorEventListener; | ||||||
| import android.hardware.SensorManager; | import android.hardware.SensorManager; | ||||||
| import android.os.Bundle; | import android.os.Bundle; | ||||||
|  | import android.util.Log; | ||||||
| import android.view.LayoutInflater; | import android.view.LayoutInflater; | ||||||
| import android.view.Menu; | import android.view.Menu; | ||||||
| import android.view.MenuInflater; | import android.view.MenuInflater; | ||||||
|  | @ -538,7 +539,13 @@ public class ContributionsFragment | ||||||
| 
 | 
 | ||||||
|     private void updateNearbyNotification(@Nullable NearbyController.NearbyPlacesInfo nearbyPlacesInfo) { |     private void updateNearbyNotification(@Nullable NearbyController.NearbyPlacesInfo nearbyPlacesInfo) { | ||||||
|         if (nearbyPlacesInfo != null && nearbyPlacesInfo.placeList != null && nearbyPlacesInfo.placeList.size() > 0) { |         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); |             String distance = formatDistanceBetween(curLatLng, closestNearbyPlace.location); | ||||||
|             closestNearbyPlace.setDistance(distance); |             closestNearbyPlace.setDistance(distance); | ||||||
|             direction = (float) computeBearing(curLatLng, closestNearbyPlace.location); |             direction = (float) computeBearing(curLatLng, closestNearbyPlace.location); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 shashankkumar
						shashankkumar