mirror of
https://github.com/bitwarden/android.git
synced 2026-10-22 02:53:19 -05:00
Share the environment flow and provide better default (#4355)
This commit is contained in:
1 parent
8a534d11d2
commit
c4f13fc8bd
1 file changed
+8
-9
+8
-9
@@ -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