shared(nearby): add layerDisplayName and wire into subtitleFor;
app(found): use shared layerDisplayName for Hittat subtitle (no UI change)
This commit is contained in:
@@ -4,15 +4,7 @@ import app.klottr.util.FoundStore // För lagerkonstanter (WIKI, DM, FO
|
||||
import app.klottr.nearby.NearbyEntryShared // Vår delade radmodell
|
||||
|
||||
// Bygg undertext: "<Lager-namn> • <avstånd> m"
|
||||
fun subtitleFor(entry: NearbyEntryShared): String = buildString { //
|
||||
append(
|
||||
when (entry.layer) {
|
||||
FoundStore.LAYER_WIKI -> "Wikipedia"
|
||||
FoundStore.LAYER_DM -> "DigitaltMuseum"
|
||||
FoundStore.LAYER_FORNSOK -> "Fornsök"
|
||||
FoundStore.LAYER_KLOTTER -> "Klotter"
|
||||
else -> "Plats"
|
||||
}
|
||||
)
|
||||
fun subtitleFor(entry: NearbyEntryShared): String = buildString { //
|
||||
append(layerDisplayName(entry.layer)) // Använd delad namngivare istället för inline-when
|
||||
append(" • ${entry.distanceM} m")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user