Merge branch 'discover_hotfix' into 'master'

Fix discover

See merge request pixeldroid/PixelDroid!405
This commit is contained in:
Matthieu 2021-12-20 15:13:21 +00:00
commit ae543c8979
2 changed files with 2 additions and 2 deletions

View File

@ -85,7 +85,7 @@ class SearchDiscoverFragment : BaseFragment() {
lifecycleScope.launchWhenCreated {
try {
val discoverPosts = api.discover()
adapter.addPosts(discoverPosts)
adapter.addPosts(discoverPosts.posts)
binding.discoverNoInfiniteLoad.visibility = View.VISIBLE
showError(show = false)
} catch (exception: IOException) {

View File

@ -292,7 +292,7 @@ interface PixelfedAPI {
// get discover
@GET("/api/v1/discover/posts")
suspend fun discover() : List<Status>
suspend fun discover() : DiscoverPosts
@FormUrlEncoded
@POST("/api/v1/reports")