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
This commit is contained in:
Konrad Pozniak 2020-02-18 08:45:10 +01:00 committed by GitHub
parent e4b8134977
commit 3f3166522b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 7 deletions

View file

@ -428,16 +428,19 @@ interface MastodonApi {
@Query("limit") limit: Int
): Single<List<Account>>
@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<String>
@Field("account_ids[]") accountIds: List<String>
): Completable
@FormUrlEncoded
@POST("api/v1/lists/{listId}/accounts")
fun addCountToList(
@Path("listId") listId: String,
@Query("account_ids[]") accountIds: List<String>
@Field("account_ids[]") accountIds: List<String>
): Completable
@GET("/api/v1/conversations")

View file

@ -29,7 +29,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/searchView" />
<com.keylesspalace.tusky.view.BackgroundMessageView
android:id="@+id/messageView"
android:layout_width="wrap_content"
@ -43,16 +42,15 @@
tools:src="@drawable/elephant_error"
tools:visibility="visible" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/accountsSearchRecycler"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="8dp"
android:background="?android:attr/windowBackground"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/searchView" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -97,7 +97,7 @@
<style name="TuskyDialogFragmentStyle" parent="@style/ThemeOverlay.MaterialComponents.Dialog">
<item name="dialogCornerRadius">8dp</item>
<item name="android:backgroundTint">?attr/windowBackgroundColor</item>
<item name="android:backgroundTint">@color/colorBackground</item>
</style>
<style name="TuskyTabAppearance" parent="Widget.MaterialComponents.TabLayout">