Location refactor compiles and seemingly works

Location updates now handled in a more compose friendly way via StateFlow
Lots of small changed in MainActivity and DetailDialogShell to make them platform independent
Add new platform apis for openUrl, openMap (AppNavigator)
Add Platform independent OutboxScheduler
Try to clean up event handling of FoundEvents and location updates (need more cleanup)
New wrapper for handling App Context in shared (could be used to clean up integration further)
This commit is contained in:
Olof Hedman
2025-09-24 16:23:38 +02:00
parent 0d1e54fcd8
commit 642e546a09
20 changed files with 317 additions and 230 deletions

View File

@@ -0,0 +1,15 @@
package app.klottr.events
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.SharedFlow
object FoundEvents {
private val _foundUpdated = MutableSharedFlow<Unit>(extraBufferCapacity = 8)
val foundUpdated: SharedFlow<Unit> = _foundUpdated
private val _locationTick = MutableSharedFlow<Unit>(extraBufferCapacity = 8)
val locationTick: SharedFlow<Unit> = _locationTick
fun notifyFoundUpdated() { _foundUpdated.tryEmit(Unit) }
fun notifyLocationTick() { _locationTick.tryEmit(Unit) }
}