diff --git a/app/src/main/java/org/pixeldroid/app/searchDiscover/SearchDiscoverFragment.kt b/app/src/main/java/org/pixeldroid/app/searchDiscover/SearchDiscoverFragment.kt index a4e634d9..a0530e7c 100644 --- a/app/src/main/java/org/pixeldroid/app/searchDiscover/SearchDiscoverFragment.kt +++ b/app/src/main/java/org/pixeldroid/app/searchDiscover/SearchDiscoverFragment.kt @@ -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) { diff --git a/app/src/main/java/org/pixeldroid/app/utils/api/PixelfedAPI.kt b/app/src/main/java/org/pixeldroid/app/utils/api/PixelfedAPI.kt index 2b1fa430..8ccf8448 100644 --- a/app/src/main/java/org/pixeldroid/app/utils/api/PixelfedAPI.kt +++ b/app/src/main/java/org/pixeldroid/app/utils/api/PixelfedAPI.kt @@ -292,7 +292,7 @@ interface PixelfedAPI { // get discover @GET("/api/v1/discover/posts") - suspend fun discover() : List + suspend fun discover() : DiscoverPosts @FormUrlEncoded @POST("/api/v1/reports")