Fix group adapter

This commit is contained in:
世界
2024-04-06 23:15:05 +08:00
parent d62fe70db5
commit 7549225ae3

View File

@@ -182,6 +182,7 @@ class GroupsFragment : Fragment(), CommandClient.Handler {
false false
binding.itemList.layoutManager = GridLayoutManager(binding.root.context, 2) binding.itemList.layoutManager = GridLayoutManager(binding.root.context, 2)
} else { } else {
adapter.group = group
adapter.setItems(items) adapter.setItems(items)
} }
updateExpand() updateExpand()
@@ -241,7 +242,7 @@ class GroupsFragment : Fragment(), CommandClient.Handler {
private class ItemAdapter( private class ItemAdapter(
val groupView: GroupView, val groupView: GroupView,
val group: OutboundGroup, var group: OutboundGroup,
private var items: MutableList<OutboundGroupItem> = mutableListOf() private var items: MutableList<OutboundGroupItem> = mutableListOf()
) : ) :
RecyclerView.Adapter<ItemGroupView>() { RecyclerView.Adapter<ItemGroupView>() {