File tree 1 file changed +6
-6
lines changed
app/src/main/java/com/canopas/yourspace/ui/flow/journey/components
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -345,14 +345,14 @@ internal fun getFormattedLocationTimeForFirstItem(createdAt: Long): String {
345
345
}
346
346
347
347
fun Address.formattedTitle (toAddress : Address ? ): String {
348
- val fromCity = this .locality
349
- val toCity = toAddress?.locality ? : " "
348
+ val fromCity = this .locality ? : this .subAdminArea ? : this .adminArea ? : this .featureName ? : " Unknown "
349
+ val toCity = toAddress?.locality ? : toAddress?.subAdminArea ? : toAddress?.adminArea ? : toAddress?.featureName ? : " Unknown "
350
350
351
- val fromArea = this .subLocality
352
- val toArea = toAddress?.subLocality ? : " "
351
+ val fromArea = this .subLocality ? : this .thoroughfare ? : this .featureName ? : fromCity
352
+ val toArea = toAddress?.subLocality ? : toAddress?.thoroughfare ? : toAddress?.featureName ? : toCity
353
353
354
- val fromState = this .adminArea
355
- val toState = toAddress?.adminArea ? : " "
354
+ val fromState = this .adminArea ? : this .countryName ? : " Unknown "
355
+ val toState = toAddress?.adminArea ? : toAddress?.countryName ? : " Unknown "
356
356
357
357
return when {
358
358
toAddress == null -> " $fromArea , $fromCity "
You can’t perform that action at this time.
0 commit comments