File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
kotlin-sdk/src/commonMain/kotlin/dev/openfeature/kotlin/sdk/multiprovider Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ import kotlinx.coroutines.coroutineScope
14
14
import kotlinx.coroutines.flow.Flow
15
15
import kotlinx.coroutines.flow.MutableSharedFlow
16
16
import kotlinx.coroutines.flow.asSharedFlow
17
+ import kotlinx.coroutines.flow.first
18
+ import kotlinx.coroutines.flow.firstOrNull
17
19
import kotlinx.coroutines.flow.launchIn
18
20
import kotlinx.coroutines.flow.onEach
19
21
@@ -119,7 +121,7 @@ class MultiProvider(
119
121
120
122
// If the status has been updated, calculate what our new event should be
121
123
if (hasStatusUpdated) {
122
- val currPrecedenceVal = eventFlow.replayCache.firstOrNull()? .run { eventPrecedence[this ::class ] } ? : 0
124
+ val currPrecedenceVal = eventFlow.first() .run { eventPrecedence[this ::class ] } ? : 0
123
125
val updatedPrecedenceVal = eventPrecedence[event::class ] ? : 0
124
126
125
127
if (updatedPrecedenceVal > currPrecedenceVal) {
You can’t perform that action at this time.
0 commit comments