File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
feature/detail/src/main/kotlin/com/ninecraft/booket/feature/detail/book Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ import kotlinx.collections.immutable.persistentListOf
3535import kotlinx.collections.immutable.toImmutableList
3636import kotlinx.collections.immutable.toPersistentList
3737import kotlinx.coroutines.async
38+ import kotlinx.coroutines.coroutineScope
3839import kotlinx.coroutines.launch
3940import java.time.LocalDateTime
4041
@@ -75,11 +76,11 @@ class BookDetailPresenter @AssistedInject constructor(
7576 var sideEffect by rememberRetained { mutableStateOf<BookDetailSideEffect ?>(null ) }
7677
7778 @Suppress(" TooGenericExceptionCaught" )
78- fun initialLoad () {
79+ suspend fun initialLoad () {
7980 uiState = UiState .Loading
8081
8182 try {
82- scope.launch {
83+ coroutineScope {
8384 val bookDetailDef = async { bookRepository.getBookDetail(screen.isbn13).getOrThrow() }
8485 val seedsDef = async { bookRepository.getSeedsStats(screen.userBookId).getOrThrow() }
8586 val readingRecordsDef = async {
You can’t perform that action at this time.
0 commit comments