Fix: reinstate cross-platform hit notifications via KMP Notifier; trigger on first new item found

This commit is contained in:
2025-10-15 14:07:12 +02:00
parent 100a7f3f2d
commit 5b846b634f
10 changed files with 128 additions and 6 deletions

View File

@@ -289,6 +289,14 @@ fun KlottrAppShell(
}
}
// Initiera notifieraren på Android
LaunchedEffect(Unit) {
try {
app.klottr.platform.PlatformNotifierProvider.provide()
} catch (e: Exception) {
// I iOS krävs ingen init; Android får context senare via PlatformNotifierProvider.init(context)
}
}
// 🔴 NYTT: Omedelbar UI-uppdatering när FoundStore ändras
// Found updates via shared event bus (no broadcasts)
@@ -659,7 +667,7 @@ fun KlottrAppShell(
// Trigga scanning när fliken blir aktiv (och när lager-inställningar ändras)
LaunchedEffect(selectedTab, showKlotter, showWiki, wikiRadius, showDm, dmRadius, showFornsok, fornsokRadius) {
if (selectedTab != "nearby") return@LaunchedEffect
nearbyRefreshing = true
nearbyRefreshing = true // Visa den grafiska loading-effekten.
nearbyError = null
val gp = LocationServiceProvider.get().current(highAccuracy = false)