Fix discover for new api route
This commit is contained in:
parent
9002e3c240
commit
b65ea6e87c
|
@ -85,7 +85,7 @@ class SearchDiscoverFragment : BaseFragment() {
|
||||||
lifecycleScope.launchWhenCreated {
|
lifecycleScope.launchWhenCreated {
|
||||||
try {
|
try {
|
||||||
val discoverPosts = api.discover()
|
val discoverPosts = api.discover()
|
||||||
adapter.addPosts(discoverPosts.posts)
|
adapter.addPosts(discoverPosts)
|
||||||
binding.discoverNoInfiniteLoad.visibility = View.VISIBLE
|
binding.discoverNoInfiniteLoad.visibility = View.VISIBLE
|
||||||
showError(show = false)
|
showError(show = false)
|
||||||
} catch (exception: IOException) {
|
} catch (exception: IOException) {
|
||||||
|
|
|
@ -292,7 +292,7 @@ interface PixelfedAPI {
|
||||||
|
|
||||||
// get discover
|
// get discover
|
||||||
@GET("/api/v1/discover/posts")
|
@GET("/api/v1/discover/posts")
|
||||||
suspend fun discover() : DiscoverPosts
|
suspend fun discover() : List<Status>
|
||||||
|
|
||||||
@FormUrlEncoded
|
@FormUrlEncoded
|
||||||
@POST("/api/v1/reports")
|
@POST("/api/v1/reports")
|
||||||
|
|
Loading…
Reference in New Issue