mirror of
https://github.com/gedoor/legado.git
synced 2024-07-19 01:17:25 +08:00
Compare commits
5 Commits
ce60219cf3
...
6c9a8a74bd
Author | SHA1 | Date | |
---|---|---|---|
|
6c9a8a74bd | ||
|
4c6ec35d95 | ||
|
b30680c02e | ||
|
a3685c4358 | ||
|
a2cc621917 |
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
|||||||
{"x86":"7bb90297b32867b4663edba1521c304a","arm64-v8a":"6281481485abdb423b9d1fcee5978157","armeabi-v7a":"3fa31a4b27e69408c6438eb24f53634b","x86_64":"5fbb8757a52a113ea8a8771b39fd7a1b","version":"125.0.6422.53"}
|
{"x86":"2aad90238c23fd16cd4f00932cc8bbfc","arm64-v8a":"44ea67de5cfb2fb4e9491efce9496e2f","armeabi-v7a":"52826628a666ad0f4b14ef602af85341","x86_64":"146de0053930fdabdb481fd9462fd1a7","version":"125.0.6422.113"}
|
@ -1,7 +1,7 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"uploadUrl": "https://sy.mgz6.cc/shuyuan,{\"method\":\"POST\",\"body\": {\"file\": \"fileRequest\"},\"type\": \"multipart/form-data\"}",
|
"uploadUrl": "https://sy.mgz6.com/shuyuan,{\"method\":\"POST\",\"body\": {\"file\": \"fileRequest\"},\"type\": \"multipart/form-data\"}",
|
||||||
"downloadUrlRule": "$.data@js:if (result == '') \n '' \n else \n 'https://shuyuan.mgz6.cc/shuyuan/' + result",
|
"downloadUrlRule": "$.data@js:if (result == '') \n '' \n else \n 'https://shuyuan.mgz6.com/shuyuan/' + result",
|
||||||
"summary": "喵公子网盘①(有效期7天)",
|
"summary": "喵公子网盘①(有效期7天)",
|
||||||
"compress": false
|
"compress": false
|
||||||
},
|
},
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
* 漫画源看书显示乱码,**阅读与其他软件的源并不通用**,请导入阅读的支持的漫画源!
|
* 漫画源看书显示乱码,**阅读与其他软件的源并不通用**,请导入阅读的支持的漫画源!
|
||||||
|
|
||||||
**2024/02/27**
|
**2024/02/27**
|
||||||
* 更新cronet: 125.0.6422.53
|
* 更新cronet: 125.0.6422.113
|
||||||
* 更新cronet: 123.0.6312.80
|
* 更新cronet: 123.0.6312.80
|
||||||
* 更新cronet: 123.0.6312.40
|
* 更新cronet: 123.0.6312.40
|
||||||
|
|
||||||
|
@ -179,6 +179,14 @@ class EpubFile(var book: Book) {
|
|||||||
elements.select("img[src=\"cover.jpeg\"]").forEachIndexed { i, it ->
|
elements.select("img[src=\"cover.jpeg\"]").forEachIndexed { i, it ->
|
||||||
if (i > 0) it.remove()
|
if (i > 0) it.remove()
|
||||||
}
|
}
|
||||||
|
elements.select("img").forEach {
|
||||||
|
if (it.attributesSize() <= 1) {
|
||||||
|
return@forEach
|
||||||
|
}
|
||||||
|
val src = it.attr("src")
|
||||||
|
it.clearAttributes()
|
||||||
|
it.attr("src", src)
|
||||||
|
}
|
||||||
val tag = Book.rubyTag
|
val tag = Book.rubyTag
|
||||||
if (book.getDelTag(tag)) {
|
if (book.getDelTag(tag)) {
|
||||||
elements.select("rp, rt").remove()
|
elements.select("rp, rt").remove()
|
||||||
|
@ -303,9 +303,7 @@ class ReadBookActivity : BaseReadBookActivity(),
|
|||||||
if (bookChanged) {
|
if (bookChanged) {
|
||||||
bookChanged = false
|
bookChanged = false
|
||||||
ReadBook.callBack = this
|
ReadBook.callBack = this
|
||||||
viewModel.initData(intent) {
|
viewModel.initData(intent)
|
||||||
upMenu()
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
//web端阅读时,app处于阅读界面,本地记录会覆盖web保存的进度,在此处恢复
|
//web端阅读时,app处于阅读界面,本地记录会覆盖web保存的进度,在此处恢复
|
||||||
ReadBook.webBookProgress?.let {
|
ReadBook.webBookProgress?.let {
|
||||||
|
@ -159,6 +159,7 @@ class MoreConfigDialog : DialogFragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PreferKey.optimizeRender -> {
|
PreferKey.optimizeRender -> {
|
||||||
|
ChapterProvider.upStyle()
|
||||||
ReadBook.callBack?.upPageAnim(true)
|
ReadBook.callBack?.upPageAnim(true)
|
||||||
ReadBook.loadContent(false)
|
ReadBook.loadContent(false)
|
||||||
}
|
}
|
||||||
|
@ -200,7 +200,7 @@ class ReadStyleDialog : BaseDialogFragment(R.layout.dialog_read_book_style),
|
|||||||
override fun selectFont(path: String) {
|
override fun selectFont(path: String) {
|
||||||
if (path != ReadBookConfig.textFont) {
|
if (path != ReadBookConfig.textFont) {
|
||||||
ReadBookConfig.textFont = path
|
ReadBookConfig.textFont = path
|
||||||
postEvent(EventBus.UP_CONFIG, arrayListOf(8, 5))
|
postEvent(EventBus.UP_CONFIG, arrayListOf(2, 5))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,6 +200,7 @@ class ReadView(context: Context, attrs: AttributeSet) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
MotionEvent.ACTION_MOVE -> {
|
MotionEvent.ACTION_MOVE -> {
|
||||||
|
if (!pressDown) return true
|
||||||
val absX = abs(startX - event.x)
|
val absX = abs(startX - event.x)
|
||||||
val absY = abs(startY - event.y)
|
val absY = abs(startY - event.y)
|
||||||
if (!isMove) {
|
if (!isMove) {
|
||||||
|
@ -881,7 +881,9 @@ object ChapterProvider {
|
|||||||
tPaint.typeface = titleFont
|
tPaint.typeface = titleFont
|
||||||
tPaint.textSize = with(ReadBookConfig) { textSize + titleSize }.toFloat().spToPx()
|
tPaint.textSize = with(ReadBookConfig) { textSize + titleSize }.toFloat().spToPx()
|
||||||
tPaint.isAntiAlias = true
|
tPaint.isAntiAlias = true
|
||||||
|
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.Q && AppConfig.optimizeRender) {
|
||||||
tPaint.isLinearText = true
|
tPaint.isLinearText = true
|
||||||
|
}
|
||||||
//正文
|
//正文
|
||||||
val cPaint = TextPaint()
|
val cPaint = TextPaint()
|
||||||
cPaint.color = ReadBookConfig.textColor
|
cPaint.color = ReadBookConfig.textColor
|
||||||
@ -889,7 +891,9 @@ object ChapterProvider {
|
|||||||
cPaint.typeface = textFont
|
cPaint.typeface = textFont
|
||||||
cPaint.textSize = ReadBookConfig.textSize.toFloat().spToPx()
|
cPaint.textSize = ReadBookConfig.textSize.toFloat().spToPx()
|
||||||
cPaint.isAntiAlias = true
|
cPaint.isAntiAlias = true
|
||||||
|
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.Q && AppConfig.optimizeRender) {
|
||||||
cPaint.isLinearText = true
|
cPaint.isLinearText = true
|
||||||
|
}
|
||||||
return Pair(tPaint, cPaint)
|
return Pair(tPaint, cPaint)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,6 +14,8 @@ import androidx.appcompat.widget.PopupMenu
|
|||||||
import androidx.appcompat.widget.SearchView
|
import androidx.appcompat.widget.SearchView
|
||||||
import androidx.core.os.bundleOf
|
import androidx.core.os.bundleOf
|
||||||
import androidx.lifecycle.Lifecycle
|
import androidx.lifecycle.Lifecycle
|
||||||
|
import androidx.lifecycle.LifecycleOwner
|
||||||
|
import androidx.lifecycle.LifecycleRegistry
|
||||||
import androidx.lifecycle.flowWithLifecycle
|
import androidx.lifecycle.flowWithLifecycle
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import androidx.lifecycle.repeatOnLifecycle
|
import androidx.lifecycle.repeatOnLifecycle
|
||||||
@ -50,6 +52,7 @@ import io.legado.app.utils.ACache
|
|||||||
import io.legado.app.utils.applyTint
|
import io.legado.app.utils.applyTint
|
||||||
import io.legado.app.utils.cnCompare
|
import io.legado.app.utils.cnCompare
|
||||||
import io.legado.app.utils.dpToPx
|
import io.legado.app.utils.dpToPx
|
||||||
|
import io.legado.app.utils.flowWithLifecycleFirst
|
||||||
import io.legado.app.utils.hideSoftInput
|
import io.legado.app.utils.hideSoftInput
|
||||||
import io.legado.app.utils.isAbsUrl
|
import io.legado.app.utils.isAbsUrl
|
||||||
import io.legado.app.utils.launch
|
import io.legado.app.utils.launch
|
||||||
@ -68,6 +71,7 @@ import kotlinx.coroutines.Job
|
|||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.flow.catch
|
import kotlinx.coroutines.flow.catch
|
||||||
import kotlinx.coroutines.flow.conflate
|
import kotlinx.coroutines.flow.conflate
|
||||||
|
import kotlinx.coroutines.flow.distinctUntilChanged
|
||||||
import kotlinx.coroutines.flow.flowOn
|
import kotlinx.coroutines.flow.flowOn
|
||||||
import kotlinx.coroutines.flow.map
|
import kotlinx.coroutines.flow.map
|
||||||
import kotlinx.coroutines.isActive
|
import kotlinx.coroutines.isActive
|
||||||
@ -98,7 +102,6 @@ class BookSourceActivity : VMBaseActivity<ActivityBookSourceBinding, BookSourceV
|
|||||||
override var sortAscending = true
|
override var sortAscending = true
|
||||||
private set
|
private set
|
||||||
private var snackBar: Snackbar? = null
|
private var snackBar: Snackbar? = null
|
||||||
private var isPaused = false
|
|
||||||
private val qrResult = registerForActivityResult(QrCodeResult()) {
|
private val qrResult = registerForActivityResult(QrCodeResult()) {
|
||||||
it ?: return@registerForActivityResult
|
it ?: return@registerForActivityResult
|
||||||
showDialogFragment(ImportBookSourceDialog(it))
|
showDialogFragment(ImportBookSourceDialog(it))
|
||||||
@ -125,6 +128,19 @@ class BookSourceActivity : VMBaseActivity<ActivityBookSourceBinding, BookSourceV
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private val groupMenuLifecycleOwner = object : LifecycleOwner {
|
||||||
|
private val registry = LifecycleRegistry(this)
|
||||||
|
override val lifecycle: Lifecycle get() = registry
|
||||||
|
|
||||||
|
fun onMenuOpened() {
|
||||||
|
registry.handleLifecycleEvent(Lifecycle.Event.ON_START)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun onMenuClosed() {
|
||||||
|
registry.handleLifecycleEvent(Lifecycle.Event.ON_STOP)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
||||||
initRecyclerView()
|
initRecyclerView()
|
||||||
@ -372,7 +388,12 @@ class BookSourceActivity : VMBaseActivity<ActivityBookSourceBinding, BookSourceV
|
|||||||
|
|
||||||
private fun initLiveDataGroup() {
|
private fun initLiveDataGroup() {
|
||||||
lifecycleScope.launch {
|
lifecycleScope.launch {
|
||||||
appDb.bookSourceDao.flowGroups().conflate().collect {
|
appDb.bookSourceDao.flowGroups()
|
||||||
|
.flowWithLifecycle(lifecycle)
|
||||||
|
.flowWithLifecycleFirst(groupMenuLifecycleOwner.lifecycle)
|
||||||
|
.conflate()
|
||||||
|
.distinctUntilChanged()
|
||||||
|
.collect {
|
||||||
groups.clear()
|
groups.clear()
|
||||||
groups.addAll(it)
|
groups.addAll(it)
|
||||||
upGroupMenu()
|
upGroupMenu()
|
||||||
@ -400,6 +421,20 @@ class BookSourceActivity : VMBaseActivity<ActivityBookSourceBinding, BookSourceV
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onMenuOpened(featureId: Int, menu: Menu): Boolean {
|
||||||
|
if (menu === groupMenu) {
|
||||||
|
groupMenuLifecycleOwner.onMenuOpened()
|
||||||
|
}
|
||||||
|
return super.onMenuOpened(featureId, menu)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPanelClosed(featureId: Int, menu: Menu) {
|
||||||
|
super.onPanelClosed(featureId, menu)
|
||||||
|
if (menu === groupMenu) {
|
||||||
|
groupMenuLifecycleOwner.onMenuClosed()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun initSelectActionBar() {
|
private fun initSelectActionBar() {
|
||||||
binding.selectActionBar.setMainActionText(R.string.delete)
|
binding.selectActionBar.setMainActionText(R.string.delete)
|
||||||
binding.selectActionBar.inflateMenu(R.menu.book_source_sel)
|
binding.selectActionBar.inflateMenu(R.menu.book_source_sel)
|
||||||
@ -637,16 +672,6 @@ class BookSourceActivity : VMBaseActivity<ActivityBookSourceBinding, BookSourceV
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPause() {
|
|
||||||
super.onPause()
|
|
||||||
isPaused = true
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onResume() {
|
|
||||||
super.onResume()
|
|
||||||
isPaused = false
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun upCountView() {
|
override fun upCountView() {
|
||||||
binding.selectActionBar
|
binding.selectActionBar
|
||||||
.upCountView(adapter.selection.size, adapter.itemCount)
|
.upCountView(adapter.selection.size, adapter.itemCount)
|
||||||
|
@ -42,7 +42,7 @@ android.defaults.buildfeatures.shaders=false
|
|||||||
# and none from the library's dependencies, thereby reducing the size of the R class for that library.
|
# and none from the library's dependencies, thereby reducing the size of the R class for that library.
|
||||||
android.nonTransitiveRClass=true
|
android.nonTransitiveRClass=true
|
||||||
# https://chromiumdash.appspot.com/releases?platform=Android
|
# https://chromiumdash.appspot.com/releases?platform=Android
|
||||||
CronetVersion=125.0.6422.53
|
CronetVersion=125.0.6422.113
|
||||||
CronetMainVersion=125.0.0.0
|
CronetMainVersion=125.0.0.0
|
||||||
android.injected.testOnly=false
|
android.injected.testOnly=false
|
||||||
android.nonFinalResIds=true
|
android.nonFinalResIds=true
|
Loading…
Reference in New Issue
Block a user