app(nearby): move markNewFinds to fetch phase; simplify NearbyDialog to render built entries; drop wiki/klotter/radius params from dialog and call site
This commit is contained in:
@@ -675,6 +675,14 @@ private fun KlottrApp(
|
||||
nearbyEntries = bundle.entries
|
||||
nearbyDm = bundle.dm
|
||||
nearbyFornsok = bundle.forn
|
||||
// [NY] Markera nya fynd direkt här (inte i dialogen)
|
||||
val nowMillis = System.currentTimeMillis() // [NY]
|
||||
app.klottr.nearby.markNewFinds( // [NY] (fullt kvalificerat anrop, ingen extra import)
|
||||
ctx = ctx, // [NY]
|
||||
entries = nearbyEntries, // [NY]
|
||||
nowMillis = nowMillis, // [NY]
|
||||
onMarked = { refreshFound() } // [NY] trigga samma uppdatering som tidigare
|
||||
)
|
||||
|
||||
// [VALFRITT] Logg – nu summerar vi entries + per-lager
|
||||
app.klottr.util.AppLog.d {
|
||||
@@ -1341,15 +1349,6 @@ private fun NearbyDialog(
|
||||
entries
|
||||
} else emptyList()
|
||||
|
||||
if (hasLocation && !loading && error == null) {
|
||||
app.klottr.nearby.markNewFinds(
|
||||
ctx = ctx,
|
||||
entries = entries,
|
||||
nowMillis = now,
|
||||
onMarked = { onMarkedFound() }
|
||||
)
|
||||
}
|
||||
|
||||
// Dialogens innehåll i delat skal med rimlig höjd (max ~80% av skärmen)
|
||||
val cfg = LocalConfiguration.current
|
||||
val maxDialogHeight = (cfg.screenHeightDp * 0.8f).dp
|
||||
|
||||
Reference in New Issue
Block a user