feat: 优化代码

pull/141/head
kunfei 5 years ago
parent 9a48e4212e
commit f81474b069
  1. 8
      app/src/main/java/io/legado/app/ui/book/read/page/ContentView.kt

@ -98,7 +98,7 @@ class ContentView(context: Context) : FrameLayout(context) {
fun upTime() { fun upTime() {
if (ReadBookConfig.hideStatusBar) { if (ReadBookConfig.hideStatusBar) {
tv_bottom_left.text = timeFormat.format(Date(System.currentTimeMillis())) tv_bottom_right.text = timeFormat.format(Date(System.currentTimeMillis()))
} }
} }
@ -126,13 +126,13 @@ class ContentView(context: Context) : FrameLayout(context) {
2 -> ZhConvertBootstrap.newInstance().toTraditional(textPage.title) 2 -> ZhConvertBootstrap.newInstance().toTraditional(textPage.title)
else -> textPage.title else -> textPage.title
} }
val progress = "${index.plus(1)}/$pageSize $readProgress"
if (ReadBookConfig.hideStatusBar) { if (ReadBookConfig.hideStatusBar) {
tv_top_left.text = title tv_top_left.text = title
tv_top_right.text = progress tv_top_right.text = readProgress
tv_bottom_left.text = "${index.plus(1)}/$pageSize"
} else { } else {
tv_bottom_left.text = title tv_bottom_left.text = title
tv_bottom_right.text = progress tv_bottom_right.text = "${index.plus(1)}/$pageSize $readProgress"
} }
} }

Loading…
Cancel
Save