Add view for browsing and unfollowing followed hashtags (#2794)

* Add view for browsing and unfollowing followed hashtags.
Implements #2785

* Improve list interface

* Remove superfluous suspend modifier

* Migrate to paginated loading for followed tags view

* Update app/src/main/java/com/keylesspalace/tusky/components/followedtags/FollowedTagsViewModel.kt

Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>

* Fix unhandled exception when opening the followed tags view while offline

Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>
This commit is contained in:
Levi Bard 2022-12-01 19:24:27 +01:00 committed by GitHub
commit 9362e59d9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 414 additions and 0 deletions

View file

@ -668,6 +668,14 @@ interface MastodonApi {
@GET("api/v1/tags/{name}")
suspend fun tag(@Path("name") name: String): NetworkResult<HashTag>
@GET("api/v1/followed_tags")
suspend fun followedTags(
@Query("min_id") minId: String? = null,
@Query("since_id") sinceId: String? = null,
@Query("max_id") maxId: String? = null,
@Query("limit") limit: Int? = null,
): Response<List<HashTag>>
@POST("api/v1/tags/{name}/follow")
suspend fun followTag(@Path("name") name: String): NetworkResult<HashTag>