Created
May 3, 2021 12:09
-
-
Save manuelvicnt/c08046c8ddf29157a981df254c2862c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LocationRepository( | |
private val locationDataSource: LocationDataSource, | |
private val externalScope: CoroutineScope | |
) { | |
val locations: Flow<Location> = | |
locationDataSource.locationsSource | |
.shareIn(externalScope, SharingStarted.Eagerly, replay = 10) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment