mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
优化
This commit is contained in:
parent
334f1da557
commit
a7217886f6
@ -108,6 +108,7 @@ class BookInfoActivity :
|
|||||||
private var chapterChanged = false
|
private var chapterChanged = false
|
||||||
private val waitDialog by lazy { WaitDialog(this) }
|
private val waitDialog by lazy { WaitDialog(this) }
|
||||||
private var editMenuItem: MenuItem? = null
|
private var editMenuItem: MenuItem? = null
|
||||||
|
private val book get() = viewModel.getBook(false)
|
||||||
|
|
||||||
override val binding by viewBinding(ActivityBookInfoBinding::inflate)
|
override val binding by viewBinding(ActivityBookInfoBinding::inflate)
|
||||||
override val viewModel by viewModels<BookInfoViewModel>()
|
override val viewModel by viewModels<BookInfoViewModel>()
|
||||||
@ -341,7 +342,11 @@ class BookInfoActivity :
|
|||||||
private fun upGroup(groupId: Long) {
|
private fun upGroup(groupId: Long) {
|
||||||
viewModel.loadGroup(groupId) {
|
viewModel.loadGroup(groupId) {
|
||||||
if (it.isNullOrEmpty()) {
|
if (it.isNullOrEmpty()) {
|
||||||
binding.tvGroup.text = getString(R.string.group_s, getString(R.string.no_group))
|
binding.tvGroup.text = if (book?.isLocal == true) {
|
||||||
|
getString(R.string.group_s, getString(R.string.local_no_group))
|
||||||
|
} else {
|
||||||
|
getString(R.string.group_s, getString(R.string.no_group))
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
binding.tvGroup.text = getString(R.string.group_s, it)
|
binding.tvGroup.text = getString(R.string.group_s, it)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user