Skip to content

Commit ca1c1d7

Browse files
committed
Add missing ID field to NearbyPlace
Signed-off-by: Rafael Chagas <chagas@gmail.com>
1 parent 0f77973 commit ca1c1d7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

library/src/main/java/com/rtchagas/pingplacepicker/repository/googlemaps/GoogleMapsRepository.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ class GoogleMapsRepository constructor(
180180

181181
val latLng = LatLng(place.geometry.location.lat, place.geometry.location.lng)
182182

183-
return NearbyPlace(place.name, photoList, place.vicinity, typeList, latLng)
183+
return NearbyPlace(place.placeId, place.name, photoList, place.vicinity, typeList, latLng)
184184
}
185185

186186
/**

library/src/main/java/com/rtchagas/pingplacepicker/repository/googlemaps/NearbyPlace.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import kotlinx.android.parcel.Parcelize
88

99
@Parcelize
1010
class NearbyPlace(
11+
var placeId: String,
1112
var placeName: String,
1213
var placePhotos: MutableList<PhotoMetadata>,
1314
var placeAddress: String,
@@ -28,7 +29,7 @@ class NearbyPlace(
2829
}
2930

3031
override fun getId(): String? {
31-
return null
32+
return placeId
3233
}
3334

3435
override fun getPhotoMetadatas(): MutableList<PhotoMetadata> {

0 commit comments

Comments
 (0)