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 {
|
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…
Reference in New Issue
Block a user