From 62a8a4a60a90c372ca47115173906dc743b0cd32 Mon Sep 17 00:00:00 2001 From: Nik Clayton Date: Fri, 30 Dec 2022 12:09:42 +0100 Subject: [PATCH] Leave the "edit scheduled status" button enabled after clicking (#3100) * Leave the "edit scheduled status" button enabled after clicking If the user submits an edit to the scheduled status then this one will be deleted, the paging source will notice, the adapter will be notified in the normal way, and this binding will be reused. Or the user backs out of the edit, and this adapter entry is still valid and should remain clickable. Fixes https://github.com/tuskyapp/Tusky/issues/2705 * Remove unnecessary parameter. * Remove unnecessary import --- .../tusky/components/scheduled/ScheduledStatusAdapter.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/components/scheduled/ScheduledStatusAdapter.kt b/app/src/main/java/com/keylesspalace/tusky/components/scheduled/ScheduledStatusAdapter.kt index 7b34b780..9d51bc53 100644 --- a/app/src/main/java/com/keylesspalace/tusky/components/scheduled/ScheduledStatusAdapter.kt +++ b/app/src/main/java/com/keylesspalace/tusky/components/scheduled/ScheduledStatusAdapter.kt @@ -16,7 +16,6 @@ package com.keylesspalace.tusky.components.scheduled import android.view.LayoutInflater -import android.view.View import android.view.ViewGroup import androidx.paging.PagingDataAdapter import androidx.recyclerview.widget.DiffUtil @@ -53,8 +52,7 @@ class ScheduledStatusAdapter( holder.binding.edit.isEnabled = true holder.binding.delete.isEnabled = true holder.binding.text.text = item.params.text - holder.binding.edit.setOnClickListener { v: View -> - v.isEnabled = false + holder.binding.edit.setOnClickListener { listener.edit(item) } holder.binding.delete.setOnClickListener {