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
This commit is contained in:
Nik Clayton 2022-12-30 12:09:42 +01:00 committed by GitHub
parent 02cadd5d33
commit 62a8a4a60a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {