Skip to content

Commit

Permalink
Rename CartMenuItemAdapter to MenuItemAdapter
Browse files Browse the repository at this point in the history
  • Loading branch information
StrixG committed Dec 30, 2023
1 parent ce9fc47 commit 46b152a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class MenuFragment : Fragment(R.layout.fragment_menu) {

private val viewModel: MenuViewModel by viewModels()

private var adapter: CartMenuItemAdapter? = null
private var adapter: MenuItemAdapter? = null

private val interactionListener = object : MenuItemInteractionListener {
override fun onAdd(cartMenuItem: CartMenuItem, position: Int) {
Expand All @@ -54,7 +54,7 @@ class MenuFragment : Fragment(R.layout.fragment_menu) {
windowInsets
}

adapter = CartMenuItemAdapter(interactionListener)
adapter = MenuItemAdapter(interactionListener)
with(binding) {
val spacingSize = resources.getDimensionPixelOffset(R.dimen.small_spacing)
menuList.addItemDecoration(SpacingItemDecoration(spacingSize))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import com.obrekht.coffeeshops.R
import com.obrekht.coffeeshops.cart.domain.model.CartMenuItem
import com.obrekht.coffeeshops.databinding.ItemMenuPositionBinding

class CartMenuItemAdapter(
class MenuItemAdapter(
private val interactionListener: MenuItemInteractionListener? = null
) : ListAdapter<CartMenuItem, CartMenuItemViewHolder>(DiffCallback()) {

Expand Down

0 comments on commit 46b152a

Please sign in to comment.