fix: minor changes

This commit is contained in:
Yaoliang
2024-07-10 08:32:56 +08:00
parent d69fb0d723
commit 3166bb5cc3
3 changed files with 4 additions and 5 deletions

View File

@@ -452,4 +452,4 @@ data class Book(
@TypeConverter
fun stringToReadConfig(json: String?) = GSON.fromJsonObject<ReadConfig>(json).getOrNull()
}
}
}

View File

@@ -591,8 +591,7 @@ object ReadBook : CoroutineScope by MainScope() {
}
}
// put a log to avoid Kotlin K2 compiler take "when" as a return statement
AppLog.putDebug("contentLoadFinish done")
return@async
}.onError {
AppLog.put("ChapterProvider ERROR", it)
appCtx.toastOnUi("ChapterProvider ERROR:\n${it.stackTraceStr}")
@@ -729,4 +728,4 @@ object ReadBook : CoroutineScope by MainScope() {
fun notifyBookChanged()
}
}
}

View File

@@ -61,7 +61,6 @@ abstract class BaseReadBookActivity :
override val binding by viewBinding(ActivityBookReadBinding::inflate)
override val viewModel by viewModels<ReadBookViewModel>()
val dateFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd")
var bottomDialog = 0
set(value) {
@@ -311,6 +310,7 @@ abstract class BaseReadBookActivity :
}
fun showSimulatedReading() {
val dateFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd")
ReadBook.book?.let { book ->
alert(titleResource = R.string.simulated_reading) {
val alertBinding = DialogSimulatedReadingBinding.inflate(layoutInflater).apply {