Skip to content

Commit

Permalink
Fix logic
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiya-kume committed Sep 16, 2023
1 parent 5e5c12e commit 65ffeeb
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import io.github.droidkaigi.confsched2023.model.OssLicenseRepository
import io.github.droidkaigi.confsched2023.ui.Inject
import kotlinx.collections.immutable.PersistentList
import kotlinx.collections.immutable.persistentListOf
import kotlinx.collections.immutable.toPersistentList
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.onStart
Expand All @@ -18,7 +19,8 @@ class DefaultOssLicenseRepository @Inject constructor(

override fun licenseData(): Flow<PersistentList<OssLicenseGroup>> {
return ossLicenseStateFlow.onStart {
ossLicenseDataSource.license()
val ossLicenseData = ossLicenseDataSource.license().toPersistentList()
ossLicenseStateFlow.emit(ossLicenseData)
}
}
}

0 comments on commit 65ffeeb

Please sign in to comment.