pull/1319/head
gedoor 3 years ago
parent a5ea1b32bb
commit e899d70000
  1. 4
      app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookActivity.kt
  2. 9
      app/src/main/java/io/legado/app/ui/book/group/GroupSelectDialog.kt
  3. 4
      app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt

@ -180,7 +180,9 @@ class ArrangeBookActivity : VMBaseActivity<ActivityArrangeBookBinding, ArrangeBo
}
override fun selectGroup(requestCode: Int, groupId: Long) {
GroupSelectDialog.show(supportFragmentManager, groupId, requestCode)
supportFragmentManager.showDialog(
GroupSelectDialog(groupId, requestCode)
)
}
override fun upGroup(requestCode: Int, groupId: Long) {

@ -33,7 +33,14 @@ import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.launch
class GroupSelectDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickListener {
class GroupSelectDialog() : BaseDialogFragment(), Toolbar.OnMenuItemClickListener {
constructor(groupId: Long, requestCode: Int = -1) : this() {
arguments = Bundle().apply {
putLong("groupId", groupId)
putInt("requestCode", requestCode)
}
}
companion object {
const val tag = "groupSelectDialog"

@ -306,7 +306,9 @@ class BookInfoActivity :
}
tvChangeGroup.setOnClickListener {
viewModel.bookData.value?.let {
GroupSelectDialog.show(supportFragmentManager, it.group)
supportFragmentManager.showDialog(
GroupSelectDialog(it.group)
)
}
}
tvAuthor.setOnClickListener {

Loading…
Cancel
Save