mirror of
https://github.com/bitwarden/android.git
synced 2026-03-12 05:04:17 -05:00
Share the environment flow and provide better default (#4355)
This commit is contained in:
@@ -33,15 +33,14 @@ class EnvironmentRepositoryImpl(
|
||||
environmentDiskSource.preAuthEnvironmentUrlData = value.environmentUrlData
|
||||
}
|
||||
|
||||
override val environmentStateFlow: StateFlow<Environment>
|
||||
get() = environmentDiskSource
|
||||
.preAuthEnvironmentUrlDataFlow
|
||||
.map { it.toEnvironmentUrlsOrDefault() }
|
||||
.stateIn(
|
||||
scope = scope,
|
||||
started = SharingStarted.Lazily,
|
||||
initialValue = Environment.Us,
|
||||
)
|
||||
override val environmentStateFlow: StateFlow<Environment> = environmentDiskSource
|
||||
.preAuthEnvironmentUrlDataFlow
|
||||
.map { it.toEnvironmentUrlsOrDefault() }
|
||||
.stateIn(
|
||||
scope = scope,
|
||||
started = SharingStarted.Lazily,
|
||||
initialValue = environment,
|
||||
)
|
||||
|
||||
init {
|
||||
authDiskSource
|
||||
|
||||
Reference in New Issue
Block a user