pull/1738/head
kunfei 3 years ago
parent 9df1e2f982
commit f6c061b5ad
  1. 7
      app/src/main/java/io/legado/app/ui/book/read/ContentEditDialog.kt

@ -54,6 +54,13 @@ class ContentEditDialog : BaseDialogFragment(R.layout.dialog_content_edit) {
}
viewModel.initContent {
binding.contentView.setText(it)
binding.contentView.post {
binding.contentView.apply {
val lineIndex = layout.getLineForOffset(ReadBook.durChapterPos)
val lineHeight = layout.getLineTop(lineIndex)
scrollTo(0, lineHeight)
}
}
}
}

Loading…
Cancel
Save