From 02207f6cfd9c396889aa1570dc62abb7aa447dbc Mon Sep 17 00:00:00 2001 From: arkon Date: Wed, 22 Apr 2020 09:14:30 -0400 Subject: [PATCH] Make entire history item card clickable --- .../tachiyomi/ui/recent/history/HistoryAdapter.kt | 8 +++----- .../ui/recent/history/HistoryController.kt | 4 ++-- .../tachiyomi/ui/recent/history/HistoryHolder.kt | 13 +++++++------ app/src/main/res/layout/history_item.xml | 4 ++-- 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryAdapter.kt index 9bcbce4b43..432b9768c4 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryAdapter.kt @@ -20,10 +20,8 @@ class HistoryAdapter(controller: HistoryController) : val sourceManager by injectLazy() val resumeClickListener: OnResumeClickListener = controller - val removeClickListener: OnRemoveClickListener = controller - - val coverClickListener: OnCoverClickListener = controller + val itemClickListener: OnItemClickListener = controller /** * DecimalFormat used to display correct chapter number @@ -44,7 +42,7 @@ class HistoryAdapter(controller: HistoryController) : fun onRemoveClick(position: Int) } - interface OnCoverClickListener { - fun onCoverClick(position: Int) + interface OnItemClickListener { + fun onItemClick(position: Int) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryController.kt index c307f46fc3..2c0a4808d6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryController.kt @@ -28,7 +28,7 @@ class HistoryController : NucleusController @@ -12,9 +13,7 @@ android:id="@+id/cover" android:layout_width="85dp" android:layout_height="match_parent" - android:clickable="true" android:contentDescription="@string/description_cover" - android:focusable="true" android:scaleType="centerCrop" />