From 052d477c0ed2a674d481878ebb8b1ac2dc90d8e2 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 8 Mar 2022 00:24:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/ui/book/toc/BookmarkAdapter.kt | 4 ++-- .../main/java/io/legado/app/ui/book/toc/BookmarkFragment.kt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/toc/BookmarkAdapter.kt b/app/src/main/java/io/legado/app/ui/book/toc/BookmarkAdapter.kt index 43a6ac72d..84d0c011f 100644 --- a/app/src/main/java/io/legado/app/ui/book/toc/BookmarkAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/book/toc/BookmarkAdapter.kt @@ -34,7 +34,7 @@ class BookmarkAdapter(context: Context, val callback: Callback) : } binding.root.onLongClick { getItem(holder.layoutPosition)?.let { bookmark -> - callback.onLongClick(bookmark) + callback.onLongClick(bookmark, holder.layoutPosition) } } @@ -42,7 +42,7 @@ class BookmarkAdapter(context: Context, val callback: Callback) : interface Callback { fun onClick(bookmark: Bookmark) - fun onLongClick(bookmark: Bookmark) + fun onLongClick(bookmark: Bookmark, pos: Int) } } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/book/toc/BookmarkFragment.kt b/app/src/main/java/io/legado/app/ui/book/toc/BookmarkFragment.kt index 0e6925d6b..b0ec07f3b 100644 --- a/app/src/main/java/io/legado/app/ui/book/toc/BookmarkFragment.kt +++ b/app/src/main/java/io/legado/app/ui/book/toc/BookmarkFragment.kt @@ -83,8 +83,8 @@ class BookmarkFragment : VMBaseFragment(R.layout.fragment_bookmark } } - override fun onLongClick(bookmark: Bookmark) { - showDialogFragment(BookmarkDialog(bookmark)) + override fun onLongClick(bookmark: Bookmark, pos: Int) { + showDialogFragment(BookmarkDialog(bookmark, pos)) } override fun upBookmark(pos: Int, bookmark: Bookmark) {