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:
parent
02cadd5d33
commit
62a8a4a60a
1 changed files with 1 additions and 3 deletions
|
@ -16,7 +16,6 @@
|
||||||
package com.keylesspalace.tusky.components.scheduled
|
package com.keylesspalace.tusky.components.scheduled
|
||||||
|
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.paging.PagingDataAdapter
|
import androidx.paging.PagingDataAdapter
|
||||||
import androidx.recyclerview.widget.DiffUtil
|
import androidx.recyclerview.widget.DiffUtil
|
||||||
|
@ -53,8 +52,7 @@ class ScheduledStatusAdapter(
|
||||||
holder.binding.edit.isEnabled = true
|
holder.binding.edit.isEnabled = true
|
||||||
holder.binding.delete.isEnabled = true
|
holder.binding.delete.isEnabled = true
|
||||||
holder.binding.text.text = item.params.text
|
holder.binding.text.text = item.params.text
|
||||||
holder.binding.edit.setOnClickListener { v: View ->
|
holder.binding.edit.setOnClickListener {
|
||||||
v.isEnabled = false
|
|
||||||
listener.edit(item)
|
listener.edit(item)
|
||||||
}
|
}
|
||||||
holder.binding.delete.setOnClickListener {
|
holder.binding.delete.setOnClickListener {
|
||||||
|
|
Loading…
Reference in a new issue