mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Add getOriginalLabel() for Wikidata edits to avoid fallback issues with itemLabel
This commit is contained in:
parent
88793d4070
commit
b86d6476f3
1 changed files with 8 additions and 0 deletions
|
|
@ -30,8 +30,16 @@ class NearbyResultItem(
|
||||||
|
|
||||||
fun getLocation(): ResultTuple = location ?: ResultTuple()
|
fun getLocation(): ResultTuple = location ?: ResultTuple()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns label for display (pins, popup), using fallback to itemLabel if needed.
|
||||||
|
*/
|
||||||
fun getLabel(): ResultTuple = label ?: itemLabel ?: ResultTuple()
|
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 getIcon(): ResultTuple = icon ?: ResultTuple()
|
||||||
|
|
||||||
fun getClassName(): ResultTuple = className ?: ResultTuple()
|
fun getClassName(): ResultTuple = className ?: ResultTuple()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue