File tree Expand file tree Collapse file tree 4 files changed +7
-20
lines changed
api/src/main/kotlin/com/ninecraft/booket/core/data/api/repository
impl/src/main/kotlin/com/ninecraft/booket/core/data/impl/repository
detail/src/main/kotlin/com/ninecraft/booket/feature/detail/book
search/src/main/kotlin/com/ninecraft/booket/feature/search/library Expand file tree Collapse file tree 4 files changed +7
-20
lines changed Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ import com.ninecraft.booket.core.model.BookDetailModel
44import com.ninecraft.booket.core.model.BookSearchModel
55import com.ninecraft.booket.core.model.BookUpsertModel
66import com.ninecraft.booket.core.model.HomeModel
7- import kotlinx.coroutines.flow.Flow
87import com.ninecraft.booket.core.model.LibraryModel
98import com.ninecraft.booket.core.model.SeedModel
9+ import kotlinx.coroutines.flow.Flow
1010
1111interface BookRepository {
1212 val bookRecentSearches: Flow <List <String >>
@@ -27,6 +27,10 @@ interface BookRepository {
2727 ): Result <BookUpsertModel >
2828
2929 suspend fun filterLibraryBooks (
30+ status : String? ,
31+ page : Int ,
32+ size : Int ,
33+ ): Result <LibraryModel >
3034
3135 suspend fun searchLibraryBooks (
3236 title : String ,
@@ -38,11 +42,5 @@ interface BookRepository {
3842
3943 suspend fun getHome (): Result <HomeModel >
4044
41- suspend fun getLibrary(
42- status: String? ,
43- page: Int ,
44- size: Int ,
45- ): Result <LibraryModel >
46-
4745 suspend fun getSeedsStats (userBookId : String ): Result <SeedModel >
4846}
Original file line number Diff line number Diff line change @@ -61,14 +61,6 @@ internal class DefaultBookRepository @Inject constructor(
6161 service.getHome().toModel()
6262 }
6363
64- override suspend fun getLibrary (
65- status : String? ,
66- page : Int ,
67- size : Int ,
68- ) = runSuspendCatching {
69- service.getLibrary(status, page, size).toModel()
70- }
71-
7264 override suspend fun getSeedsStats (userBookId : String ) = runSuspendCatching {
7365 service.getSeedsStats(userBookId).toModel()
7466 }
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ class BookDetailPresenter @AssistedInject constructor(
8686
8787 fun getBookDetail () {
8888 scope.launch {
89- bookRepository.getBookDetail(screen.isbn )
89+ bookRepository.getBookDetail(screen.isbn13 )
9090 .onSuccess { result ->
9191 bookDetail = result
9292 }
Original file line number Diff line number Diff line change @@ -149,10 +149,7 @@ class LibrarySearchPresenter @AssistedInject constructor(
149149 }
150150
151151 is LibrarySearchUiEvent .OnBookClick -> {
152- val userBookId = event.userBookId
153- val isbn13 = event.isbn13
154- // TODO: 도서 상세 화면에 isbn13, userBookId 넘겨야 함
155- navigator.goTo(BookDetailScreen (isbn13 = isbn13))
152+ navigator.goTo(BookDetailScreen (event.userBookId, event.isbn13))
156153 }
157154 }
158155 }
You can’t perform that action at this time.
0 commit comments