fix: minor changes
This commit is contained in:
@@ -330,8 +330,7 @@ abstract class BaseReadBookActivity :
|
|||||||
{ _, yy, mm, dayOfMonth ->
|
{ _, yy, mm, dayOfMonth ->
|
||||||
// 使用Java 8的日期和时间API来格式化日期
|
// 使用Java 8的日期和时间API来格式化日期
|
||||||
val date = LocalDate.of(yy, mm + 1, dayOfMonth) // Java 8的LocalDate,月份从1开始
|
val date = LocalDate.of(yy, mm + 1, dayOfMonth) // Java 8的LocalDate,月份从1开始
|
||||||
val formatter: DateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd")
|
val formattedDate = date.format(dateFormatter)
|
||||||
val formattedDate = date.format(formatter)
|
|
||||||
startDate.setText(formattedDate)
|
startDate.setText(formattedDate)
|
||||||
}, localStartDate.year, localStartDate.monthValue - 1, localStartDate.dayOfMonth
|
}, localStartDate.year, localStartDate.monthValue - 1, localStartDate.dayOfMonth
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -229,12 +229,11 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
|
|||||||
AppLog.put("拉取阅读进度失败《${book.name}》\n${it.localizedMessage}", it)
|
AppLog.put("拉取阅读进度失败《${book.name}》\n${it.localizedMessage}", it)
|
||||||
}.onSuccess { progress ->
|
}.onSuccess { progress ->
|
||||||
if (progress.durChapterIndex < book.durChapterIndex ||
|
if (progress.durChapterIndex < book.durChapterIndex ||
|
||||||
progress.durChapterIndex >= book.simulatedTotalChapterNum() ||
|
|
||||||
(progress.durChapterIndex == book.durChapterIndex
|
(progress.durChapterIndex == book.durChapterIndex
|
||||||
&& progress.durChapterPos < book.durChapterPos)
|
&& progress.durChapterPos < book.durChapterPos)
|
||||||
) {
|
) {
|
||||||
alertSync?.invoke(progress)
|
alertSync?.invoke(progress)
|
||||||
} else {
|
} else if (progress.durChapterIndex < book.simulatedTotalChapterNum()) {
|
||||||
ReadBook.setProgress(progress)
|
ReadBook.setProgress(progress)
|
||||||
AppLog.put("自动同步阅读进度成功《${book.name}》 ${progress.durChapterTitle}")
|
AppLog.put("自动同步阅读进度成功《${book.name}》 ${progress.durChapterTitle}")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<string name="start_chapter">Start Chapter</string>
|
|
||||||
</resources>
|
|
||||||
Reference in New Issue
Block a user