Skip to content

Commit 90c8cf3

Browse files
committed
FIX: OnBoardingRepositoryImpl의 MutableSharedFlow에서collector가 없을 때 emit이 suspend되지 않도록 수정
1 parent 96d5468 commit 90c8cf3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

data/src/main/java/com/threegap/bitnagil/data/onboarding/repositoryImpl/OnBoardingRepositoryImpl.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import com.threegap.bitnagil.domain.onboarding.model.OnBoardingAbstract
99
import com.threegap.bitnagil.domain.onboarding.model.OnBoardingRecommendRoutine
1010
import com.threegap.bitnagil.domain.onboarding.model.OnBoardingRecommendRoutineEvent
1111
import com.threegap.bitnagil.domain.onboarding.repository.OnBoardingRepository
12+
import kotlinx.coroutines.channels.BufferOverflow
1213
import kotlinx.coroutines.flow.Flow
1314
import kotlinx.coroutines.flow.MutableSharedFlow
1415
import kotlinx.coroutines.flow.asSharedFlow
@@ -63,6 +64,9 @@ class OnBoardingRepositoryImpl @Inject constructor(
6364
}
6465
}
6566

66-
private val _onBoardingRecommendRoutineEventFlow = MutableSharedFlow<OnBoardingRecommendRoutineEvent>()
67+
private val _onBoardingRecommendRoutineEventFlow = MutableSharedFlow<OnBoardingRecommendRoutineEvent>(
68+
extraBufferCapacity = 1,
69+
onBufferOverflow = BufferOverflow.DROP_OLDEST,
70+
)
6771
override suspend fun getOnBoardingRecommendRoutineEventFlow(): Flow<OnBoardingRecommendRoutineEvent> = _onBoardingRecommendRoutineEventFlow.asSharedFlow()
6872
}

0 commit comments

Comments
 (0)