Skip to content

Commit 1107cc7

Browse files
author
15dd
committed
v3.9.8
1 parent be22ee4 commit 1107cc7

File tree

15 files changed

+63
-81
lines changed

15 files changed

+63
-81
lines changed

.idea/compiler.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/deploymentTargetSelector.xml

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ⚠️该项目已进入维护阶段,不开发新功能,仅修复特大问题!⚠️
1+
## ⚠️该项目已进入维护阶段,不再开发新功能,仅修复bug!⚠️
22
<hr>
33

44
<div align="center">

app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ android {
1414
applicationId = "com.cyh128.hikari_novel"
1515
minSdk = 24
1616
targetSdk = 34 //暂时不要升到35,不然之前的edgeToEdge效果会消失
17-
versionCode = 251002
18-
versionName = "3.9.7"
17+
versionCode = 251019
18+
versionName = "3.9.8"
1919

2020
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
2121
}

app/src/main/java/com/cyh128/hikari_novel/ui/detail/comment/CommentListAdapter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class CommentListAdapter(
3232
tvICommentReplyCount.text = item.replyCount
3333
tvICommentComment.text = item.content
3434
tvICommentTime.text = item.time
35-
cvICommentUsername.setOnClickListener {
35+
tvICommentUsername.setOnClickListener {
3636
onUsernameClick(item.uid)
3737
}
3838
root.setOnClickListener {

app/src/main/java/com/cyh128/hikari_novel/ui/detail/comment/reply/ReplyListAdapter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ReplyListAdapter(
3636
if (it == 1) return@let ResourceUtil.getString(R.string.content)
3737
else return@let "${it}${ResourceUtil.getString(R.string.floors)}"
3838
}
39-
cvIReplyUsername.setOnClickListener {
39+
tvIReplyUsername.setOnClickListener {
4040
onUsernameClick(item.uid)
4141
}
4242
}

app/src/main/java/com/cyh128/hikari_novel/ui/read/horizontal/PageView.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import android.graphics.Color
66
import android.graphics.Typeface
77
import android.text.TextPaint
88
import android.util.AttributeSet
9+
import android.util.Log
910
import android.view.MotionEvent
1011
import android.widget.ViewFlipper
1112
import androidx.core.view.size

app/src/main/java/com/cyh128/hikari_novel/ui/read/horizontal/ReadActivity.kt

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package com.cyh128.hikari_novel.ui.read.horizontal
33
import android.animation.Animator
44
import android.content.Intent
55
import android.os.Bundle
6+
import android.util.Log
67
import android.util.TypedValue
78
import android.view.KeyEvent
89
import android.view.LayoutInflater
@@ -57,11 +58,13 @@ class ReadActivity : BaseActivity<ActivityHorizontalReadBinding>() {
5758
binding.tbAHRead.setNavigationOnClickListener { finish() }
5859
supportActionBar?.setTitle(R.string.loading)
5960

60-
intent.getParcelableExtra<ReadParcel>("data")!!.also {
61-
viewModel.novel = it.novel
62-
viewModel.curVolumePos = it.curVolumePos
63-
viewModel.curChapterPos = it.curChapterPos
64-
viewModel.goToLatest = it.goToLatest
61+
if (viewModel.novel == null) {
62+
intent.getParcelableExtra<ReadParcel>("data")!!.also { data ->
63+
viewModel.novel = data.novel
64+
viewModel.curVolumePos = data.curVolumePos
65+
viewModel.curChapterPos = data.curChapterPos
66+
viewModel.goToLatest = data.goToLatest
67+
}
6568
}
6669

6770
receiveEvent<Event>("event_horizontal_read_activity") { event ->
@@ -80,6 +83,7 @@ class ReadActivity : BaseActivity<ActivityHorizontalReadBinding>() {
8083
viewModel.getByCid.take(1).last()?.let {
8184
if (viewModel.goToLatest) {
8285
validatePageNum(it)
86+
viewModel.goToLatest = false
8387
} else {
8488
if (viewModel.getIsShowChapterReadHistory()) {
8589
if (viewModel.getIsShowChapterReadHistoryWithoutConfirm()) {
@@ -156,6 +160,11 @@ class ReadActivity : BaseActivity<ActivityHorizontalReadBinding>() {
156160
viewModel.getNovelContent()
157161
}
158162

163+
override fun onDestroy() {
164+
viewModel.goToLatest = true
165+
super.onDestroy()
166+
}
167+
159168
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
160169
menuInflater.inflate(R.menu.menu_act_v_h_read, menu)
161170
return true
@@ -433,7 +442,7 @@ class ReadActivity : BaseActivity<ActivityHorizontalReadBinding>() {
433442
private fun toNextChapter() {
434443
lifecycleScope.launch {
435444
if (viewModel.curChapterPos == viewModel.curVolume.chapters.size - 1) { //判断是不是该卷的最后一章
436-
if (viewModel.curVolumePos == viewModel.novel.volume.size - 1) {
445+
if (viewModel.curVolumePos == viewModel.novel!!.volume.size - 1) {
437446
Snackbar.make(binding.root, R.string.no_next_chapter, Snackbar.LENGTH_INDEFINITE)
438447
.apply {
439448
setAnchorView(binding.llAHReadBottomBar) //使它出现在bottomAppBar的上面,避免遮挡内容

0 commit comments

Comments
 (0)