File tree 8 files changed +29
-242
lines changed
src/main/kotlin/co/anitrend/data
favourite/datasource/remote
common-media-ui/src/main/kotlin/co/anitrend/common/media/ui/compose/item
feature-media-carousel/src/main/kotlin/co/anitrend/media/carousel/component/compose
feature-search/src/main/kotlin/co/anitrend/search/component/screen
8 files changed +29
-242
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- schema :
2
- - anilist.schema.graphql
3
- - anitrend.schema.graphql
1
+ schema : schema.graphql
4
2
documents : ' src/main/assets/graphql/*.graphql'
5
3
extensions :
6
4
endpoints :
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ package co.anitrend.data.favourite.datasource.remote
2
+
3
+ import co.anitrend.data.core.GRAPHQL
4
+ import co.anitrend.data.core.api.model.GraphQLResponse
5
+ import io.github.wax911.library.annotation.GraphQuery
6
+ import io.github.wax911.library.model.request.QueryContainerBuilder
7
+ import retrofit2.Response
8
+ import retrofit2.http.Body
9
+ import retrofit2.http.POST
10
+
11
+ internal interface FavouriteRemoteSource {
12
+
13
+ @GRAPHQL
14
+ @POST
15
+ @GraphQuery(" ToggleAnimeFavorite" )
16
+ suspend fun toggleAnimeFavorite (
17
+ @Body queryContainer : QueryContainerBuilder
18
+ ): Response <GraphQLResponse <Boolean >>
19
+ }
Original file line number Diff line number Diff line change @@ -41,4 +41,4 @@ internal sealed class MediaModelContainer {
41
41
@SerialName(" media" ) val media : List <MediaModel .Core > = emptyList()
42
42
) : IPageModel
43
43
}
44
- }
44
+ }
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ fun MediaCarouselItem(
111
111
) {
112
112
items(
113
113
count = carouselItems.size,
114
- key = { carouselItems[it].id },
114
+ key = { carouselItems[it].hashCode() },
115
115
contentType = { carouselItems[it].carouselType },
116
116
) { index ->
117
117
val carouselItem = carouselItems[index]
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import co.anitrend.common.media.ui.compose.item.MediaCarouselItem
8
8
import co.anitrend.core.android.ui.AniTrendPreview
9
9
import co.anitrend.core.android.ui.theme.preview.PreviewTheme
10
10
import co.anitrend.domain.carousel.entity.MediaCarousel
11
+ import co.anitrend.domain.medialist.enums.ScoreFormat
11
12
import co.anitrend.media.carousel.component.viewmodel.state.CarouselState
12
13
import co.anitrend.navigation.model.common.IParam
13
14
@@ -32,10 +33,10 @@ fun CarouselScreen(
32
33
@Composable
33
34
private fun CarouselScreenPreview () {
34
35
PreviewTheme (wrapInSurface = true ) {
35
- // MediaCarouselItem(
36
- // carouselItems = emptyList(),
37
- // settings = settings ,
38
- // headerSeeMoreClick = {},
39
- // )
36
+ MediaCarouselItem (
37
+ carouselItems = emptyList(),
38
+ mediaPreferenceData = MediaPreferenceData (scoreFormat = ScoreFormat . POINT_100 ) ,
39
+ carouselItemClick = {},
40
+ )
40
41
}
41
42
}
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ import co.anitrend.search.component.presenter.SearchPresenter
35
35
class SearchScreen : AniTrendScreen () {
36
36
37
37
private val presenter by inject<SearchPresenter >()
38
- private val param by extra< SearchRouter . SearchParam >(default = SearchRouter . SearchParam () )
38
+ private val param by extra( SearchRouter :: SearchParam )
39
39
40
40
override fun onCreate (savedInstanceState : Bundle ? ) {
41
41
super .onCreate(savedInstanceState)
You can’t perform that action at this time.
0 commit comments