mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
优化
This commit is contained in:
parent
942f98ce5c
commit
3a71d7db89
@ -60,6 +60,7 @@ class GroupEditDialog() : BaseDialogFragment(R.layout.dialog_book_group_edit) {
|
||||
bookGroup?.let {
|
||||
binding.btnDelete.visible(it.groupId > 0 || it.groupId == Long.MIN_VALUE)
|
||||
binding.tieGroupName.setText(it.groupName)
|
||||
binding.spSort.setSelection(it.bookSort + 1)
|
||||
binding.ivCover.load(it.cover)
|
||||
} ?: let {
|
||||
binding.toolBar.title = getString(R.string.add_group)
|
||||
@ -81,6 +82,7 @@ class GroupEditDialog() : BaseDialogFragment(R.layout.dialog_book_group_edit) {
|
||||
bookGroup?.let {
|
||||
it.groupName = groupName
|
||||
it.cover = binding.ivCover.bitmapPath
|
||||
it.bookSort = binding.spSort.selectedItemPosition - 1
|
||||
viewModel.upGroup(it) {
|
||||
dismiss()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user