Skip to content

Commit

Permalink
fix recommendation not loading if nothing on list
Browse files Browse the repository at this point in the history
  • Loading branch information
DatL4g committed May 28, 2024
1 parent 39609c4 commit 62dc4ef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,12 @@ sealed interface DiscoverState {
)
}?.distinctBy { it.id }

if (mediumList.isNullOrEmpty()) {
Failure(response.exception)
} else {
Matching(
query = PageMediaQuery.Recommendation(
nsfw = nsfw,
collection = mediumList.toImmutableList()
)
Matching(
query = PageMediaQuery.Recommendation(
nsfw = nsfw,
collection = mediumList.orEmpty().toImmutableList()
)
}
)
}
}

Expand Down Expand Up @@ -158,11 +154,11 @@ sealed interface DiscoverListType {

companion object {
val entries = persistentSetOf(
DiscoverListType.Recommendation,
DiscoverListType.Spring,
DiscoverListType.Summer,
DiscoverListType.Fall,
DiscoverListType.Winter
Recommendation,
Spring,
Summer,
Fall,
Winter
)
}
}
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
app = "1.0.1"
app = "1.0.2"
aboutlibraries = "11.2.0"
activity = "1.9.0"
ads = "23.0.0"
Expand Down

0 comments on commit 62dc4ef

Please sign in to comment.