shared(nearby): add layerDisplayName and wire into subtitleFor;
app(found): use shared layerDisplayName for Hittat subtitle (no UI change)
This commit is contained in:
@@ -805,13 +805,8 @@ private fun KlottrApp(
|
||||
} else base
|
||||
},
|
||||
subtitleFor = { f -> // Undertext "<lager> • <avstånd> m" (+ ev. koordinater)
|
||||
val layerName = when (f.layer) {
|
||||
FoundStore.LAYER_KLOTTER -> "Klotter"
|
||||
FoundStore.LAYER_FORNSOK -> "Fornsök"
|
||||
FoundStore.LAYER_DM -> "DigitaltMuseum"
|
||||
FoundStore.LAYER_WIKI -> "Wikipedia"
|
||||
else -> "Plats"
|
||||
}
|
||||
val layerName = app.klottr.nearby.layerDisplayName(f.layer) // Centralt visningsnamn från :shared
|
||||
|
||||
val my = LastLocationStore.lastKnownLocation //
|
||||
val distM = my?.let { app.klottr.util.distanceMeters(it.latitude, it.longitude, f.lat, f.lon).roundToInt() } //
|
||||
val distText = distM?.let { formatDistance(it) } ?: "-" //
|
||||
|
||||
Reference in New Issue
Block a user