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)
16 lines
538 B
Kotlin
16 lines
538 B
Kotlin
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) }
|
|
}
|