Add getOriginalLabel() for Wikidata edits to avoid fallback issues with itemLabel

This commit is contained in:
Sonal Yadav 2025-08-01 08:19:51 +05:30
parent 88793d4070
commit b86d6476f3

View file

@ -30,8 +30,16 @@ class NearbyResultItem(
fun getLocation(): ResultTuple = location ?: ResultTuple()
/**
* Returns label for display (pins, popup), using fallback to itemLabel if needed.
*/
fun getLabel(): ResultTuple = label ?: itemLabel ?: ResultTuple()
/**
* Returns only the original label field, for Wikidata edits.
*/
fun getOriginalLabel(): ResultTuple = label ?: ResultTuple()
fun getIcon(): ResultTuple = icon ?: ResultTuple()
fun getClassName(): ResultTuple = className ?: ResultTuple()