From 5d5a804c5bc5855665dfbbafb0d0c3c7961d549c Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 17 Mar 2020 10:43:58 +0800 Subject: [PATCH 1/5] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/assets/updateLog.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/assets/updateLog.md b/app/src/main/assets/updateLog.md index cd3772d30..859370ed1 100644 --- a/app/src/main/assets/updateLog.md +++ b/app/src/main/assets/updateLog.md @@ -2,12 +2,12 @@ * 旧版数据导入教程:先在旧版阅读(2.x)中进行备份,然后在新版阅读(3.x)【我的】->【备份与恢复】,选择【导入旧版本数据】。 * 请关注[开源阅读]()支持我,同时关注合作公众号[小说拾遗](),阅读公众号小编。 -**2020/03/15** +**2020/03/16** * 弄了个企业公众号[开源阅读](),后面弄好后会把原来的开源阅读软件迁移过来 * 修复滚动模式切换章节位置不归0的bug * 修复文字选择更多菜单在部分手机上报错的bug -**2020/03/14** +**2020/03/15** * 加载正文无书源时自动换源 **2020/03/14** From 41ffd465288acefe34ad81904ec77123d2166d81 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 17 Mar 2020 13:24:37 +0800 Subject: [PATCH 2/5] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/ui/book/read/TextActionMenu.kt | 6 ++++++ .../app/ui/main/bookshelf/books/BooksFragment.kt | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/app/src/main/java/io/legado/app/ui/book/read/TextActionMenu.kt b/app/src/main/java/io/legado/app/ui/book/read/TextActionMenu.kt index b64ec996d..3fe423f8e 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/TextActionMenu.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/TextActionMenu.kt @@ -128,6 +128,12 @@ class TextActionMenu(private val context: Context, private val callBack: CallBac context.toast(e.localizedMessage ?: "ERROR") } } + else -> item.intent?.let { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + it.putExtra(Intent.EXTRA_PROCESS_TEXT, callBack.selectedText) + context.startActivity(it) + } + } } } diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksFragment.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksFragment.kt index 43375288e..4a91379ae 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksFragment.kt @@ -7,6 +7,7 @@ import androidx.lifecycle.Observer import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.LinearLayoutManager +import androidx.recyclerview.widget.RecyclerView import io.legado.app.App import io.legado.app.R import io.legado.app.base.BaseFragment @@ -74,6 +75,19 @@ class BooksFragment : BaseFragment(R.layout.fragment_books), booksAdapter = BooksAdapterGrid(requireContext(),this) } rv_bookshelf.adapter = booksAdapter + booksAdapter.registerAdapterDataObserver(object : RecyclerView.AdapterDataObserver() { + override fun onItemRangeInserted(positionStart: Int, itemCount: Int) { + if (positionStart == 0) { + + } + } + + override fun onItemRangeMoved(fromPosition: Int, toPosition: Int, itemCount: Int) { + if (toPosition == 0) { + + } + } + }) } private fun upRecyclerData() { From c417660e2cd35a54fff751c83caf80d1c01082ee Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 17 Mar 2020 13:30:49 +0800 Subject: [PATCH 3/5] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/res/layout/item_text.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/res/layout/item_text.xml b/app/src/main/res/layout/item_text.xml index e37188e47..357efdde3 100644 --- a/app/src/main/res/layout/item_text.xml +++ b/app/src/main/res/layout/item_text.xml @@ -9,6 +9,7 @@ android:gravity="center" android:padding="5dp" android:maxLines="1" + android:scrollbars="none" android:textColor="@color/tv_text_default" android:textSize="14sp" tools:ignore="UnusedAttribute" /> From eaa5bfab6c8879a24efc0c74214f276e5484b03d Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 17 Mar 2020 13:31:24 +0800 Subject: [PATCH 4/5] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/assets/updateLog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/assets/updateLog.md b/app/src/main/assets/updateLog.md index 859370ed1..5410750cb 100644 --- a/app/src/main/assets/updateLog.md +++ b/app/src/main/assets/updateLog.md @@ -6,6 +6,7 @@ * 弄了个企业公众号[开源阅读](),后面弄好后会把原来的开源阅读软件迁移过来 * 修复滚动模式切换章节位置不归0的bug * 修复文字选择更多菜单在部分手机上报错的bug +* 修复文字选择菜单问题 **2020/03/15** * 加载正文无书源时自动换源 From 107c10ec957dd1f27d9aa4d978df9715473e7cc6 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 17 Mar 2020 13:35:38 +0800 Subject: [PATCH 5/5] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt index 6c6d52aca..90d559f8d 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt @@ -126,7 +126,7 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { } }?.onError { toast(R.string.error_load_toc) - } ?: autoChangeSource(book.name, book.author) + } } } }