mirror of
https://github.com/Nezumi-2711/Foodify.git
synced 2026-09-22 13:38:41 +00:00
Remove food when quantity is 0
This commit is contained in:
@@ -70,6 +70,11 @@ public class BasketAdapter extends RecyclerView.Adapter<BasketAdapter.BasketView
|
||||
|
||||
//Update total price
|
||||
calculateTotalPrice();
|
||||
|
||||
//Auto delete food when quantity is 0
|
||||
if(newValue == 0){
|
||||
listBasketFood.remove(holder.getAdapterPosition());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user