From 3f3166522b39563f9f2c9782a82afe84b0f4431a Mon Sep 17 00:00:00 2001 From: Konrad Pozniak Date: Tue, 18 Feb 2020 08:45:10 +0100 Subject: [PATCH] fix list editing by moving account_ids from query to form param (#1690) * fix list editing by moving account_ids from query to form param * fix DialogFramentStyle --- .../java/com/keylesspalace/tusky/network/MastodonApi.kt | 9 ++++++--- app/src/main/res/layout/fragment_accounts_in_list.xml | 4 +--- app/src/main/res/values/styles.xml | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/network/MastodonApi.kt b/app/src/main/java/com/keylesspalace/tusky/network/MastodonApi.kt index da61cb6a..ccd8371b 100644 --- a/app/src/main/java/com/keylesspalace/tusky/network/MastodonApi.kt +++ b/app/src/main/java/com/keylesspalace/tusky/network/MastodonApi.kt @@ -428,16 +428,19 @@ interface MastodonApi { @Query("limit") limit: Int ): Single> - @DELETE("api/v1/lists/{listId}/accounts") + @FormUrlEncoded + // @DELETE doesn't support fields + @HTTP(method = "DELETE", path = "api/v1/lists/{listId}/accounts", hasBody = true) fun deleteAccountFromList( @Path("listId") listId: String, - @Query("account_ids[]") accountIds: List + @Field("account_ids[]") accountIds: List ): Completable + @FormUrlEncoded @POST("api/v1/lists/{listId}/accounts") fun addCountToList( @Path("listId") listId: String, - @Query("account_ids[]") accountIds: List + @Field("account_ids[]") accountIds: List ): Completable @GET("/api/v1/conversations") diff --git a/app/src/main/res/layout/fragment_accounts_in_list.xml b/app/src/main/res/layout/fragment_accounts_in_list.xml index ca9348f4..d4522c84 100644 --- a/app/src/main/res/layout/fragment_accounts_in_list.xml +++ b/app/src/main/res/layout/fragment_accounts_in_list.xml @@ -29,7 +29,6 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/searchView" /> - - + \ No newline at end of file diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 14d8e102..269115bc 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -97,7 +97,7 @@