pull/1738/head
kunfei 3 years ago
parent afd8b92af7
commit 3bcef6fe9d
  1. 7
      app/src/main/java/io/legado/app/ui/book/toc/ChapterListAdapter.kt
  2. 1
      app/src/main/res/layout/item_chapter_list.xml

@ -16,6 +16,7 @@ import io.legado.app.lib.theme.ThemeUtils
import io.legado.app.lib.theme.accentColor
import io.legado.app.utils.getCompatColor
import io.legado.app.utils.gone
import io.legado.app.utils.longToastOnUi
import io.legado.app.utils.visible
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.isActive
@ -145,6 +146,12 @@ class ChapterListAdapter(context: Context, val callback: Callback) :
callback.openChapter(it)
}
}
holder.itemView.setOnLongClickListener {
getItem(holder.layoutPosition)?.let {
context.longToastOnUi(getDisplayTile(it))
}
true
}
}
private fun upHasCache(binding: ItemChapterListBinding, isDur: Boolean, cached: Boolean) =

@ -13,7 +13,6 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="marquee"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/iv_checked"

Loading…
Cancel
Save