Closed sschemer closed 5 months ago
As of v0.47
it.USER_LOCATION?.let { location ->
it.STORES_OF_CUR_CITY.filter { store -> store.storeType == storetype }
.minByOrNull {
val latLng = store.latLang()
val distance =
AMapUtils.calculateLineDistance(
LatLng(location.latitude, location.longitude),
LatLng(latLng.latitude, latLng.longitude)
)
distance
}
?.let { store ->
BookingConstants.CUR_STORE = store
RxBus.Instance().send(BookingConstants.EVENT_CHANGE_STORE)
}
}
in lambda body of above code, I think it will be better if not breaking first line and reducing space before later method callings.