pull/2692/head
kunfei 2 years ago
parent 942f98ce5c
commit 3a71d7db89
  1. 2
      app/src/main/java/io/legado/app/ui/book/group/GroupEditDialog.kt

@ -60,6 +60,7 @@ class GroupEditDialog() : BaseDialogFragment(R.layout.dialog_book_group_edit) {
bookGroup?.let { bookGroup?.let {
binding.btnDelete.visible(it.groupId > 0 || it.groupId == Long.MIN_VALUE) binding.btnDelete.visible(it.groupId > 0 || it.groupId == Long.MIN_VALUE)
binding.tieGroupName.setText(it.groupName) binding.tieGroupName.setText(it.groupName)
binding.spSort.setSelection(it.bookSort + 1)
binding.ivCover.load(it.cover) binding.ivCover.load(it.cover)
} ?: let { } ?: let {
binding.toolBar.title = getString(R.string.add_group) binding.toolBar.title = getString(R.string.add_group)
@ -81,6 +82,7 @@ class GroupEditDialog() : BaseDialogFragment(R.layout.dialog_book_group_edit) {
bookGroup?.let { bookGroup?.let {
it.groupName = groupName it.groupName = groupName
it.cover = binding.ivCover.bitmapPath it.cover = binding.ivCover.bitmapPath
it.bookSort = binding.spSort.selectedItemPosition - 1
viewModel.upGroup(it) { viewModel.upGroup(it) {
dismiss() dismiss()
} }

Loading…
Cancel
Save