Deleted Item from Room Database Reloads after app restart

So i have a recyclerview with few items(meals) where a user adds from a alertdialog. When I start the app and add a meal then immediately delete it and quit the app , when starting it second time the meal i just added is loaded from the database and it was not deleted , while it must be. When i delete it the second time when it was added previously it gets deleted and not loaded again.

This is my AppDatabase.class:

@Database(entities = {FoodItem.class, FoodMenuItem.class}, version = 1)
public abstract class AppDatabase extends RoomDatabase {
    public abstract FoodItemDao foodItemDao();
    public abstract FoodMenuItemDao foodMenuItemDao();
    private static AppDatabase INSTANCE;

    public static AppDatabase getInstance(Context context) {
        if(INSTANCE == null){
            INSTANCE = Room.databaseBuilder(context.getApplicationContext(), AppDatabase.class, "DB_NAME")
                    .allowMainThreadQueries()
                    .build();
        }
        return INSTANCE;
    }
}

This is my FoodItem.class

@Entity
public class FoodItem {
    @PrimaryKey(autoGenerate = true)
    public int id;
    public String mealName;
    public double kcal;
    public double fats;
    public double proteins;
    public double carbs;
    public String date;
    public int quantity;

    public FoodItem(String mealName, double kcal, double fats, double carbs, double proteins, String date) {
        this.mealName = mealName;
        this.kcal = kcal;
        this.fats = fats;
        this.carbs = carbs;
        this.proteins = proteins;
        this.date = date;
        this.quantity = 100;
    }

    public int getId() {
        return id;
    }

    public String getMealName() {
        return mealName;
    }

    public double getKcal() {
        return kcal;
    }

    public double getFats() {
        return fats;
    }

    public double getProteins() {
        return proteins;
    }

    public double getCarbs() {
        return carbs;
    }

    public String getDate() {
        return date;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setMealName(String mealName) {
        this.mealName = mealName;
    }

    public void setKcal(double kcal) {
        this.kcal = kcal;
    }

    public void setFats(double fats) {
        this.fats = fats;
    }

    public void setProteins(double proteins) {
        this.proteins = proteins;
    }

    public void setCarbs(double carbs) {
        this.carbs = carbs;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }
}

These are few methods from the MealAdapter.class :

public void addMeal(FoodItem meal) {
        meals.add(meal);
        notifyItemInserted(meals.size() - 1);
    }
    public List<FoodItem> getMeals() {
        return meals;
    }
public MealAdapter(List<FoodItem> meals) {
        this.meals = meals;
    }
    public FoodItem getMealAt(int position) {
        return meals.get(position);
    }

    public void removeMeal(FoodItem foodItem) {
        int position = meals.indexOf(foodItem);
        if (position != -1) {
            meals.remove(position);
            notifyItemRemoved(position);
        }
    }

This is my FoodItemDao :

@Dao
public interface FoodItemDao {
    @Insert
    void insert(FoodItem foodItem);
    @Query("SELECT * FROM FoodItem")
    List<FoodItem> getAllMeals();
    @Query("SELECT * FROM FoodItem")
    FoodItem getMeal();
    @Delete
    void delete(FoodItem foodItem);
    @Query("SELECT * FROM FoodItem WHERE date = :date")
    List<FoodItem> getMealsByDate(String date);
    @Query("DELETE FROM FoodItem WHERE date = :date")
    void deleteMealsByDate(String date);
}

This is my Activity :

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_macros_calculator);

db = Room.databaseBuilder(getApplicationContext(),
                AppDatabase.class, "DB_NAME").allowMainThreadQueries().build();
        foodMenuItemDao = db.foodMenuItemDao();
        foodItemDao = db.foodItemDao();

List<FoodItem> savedMeals = loadTodaysMealsFromDatabase();
        for (FoodItem meal : savedMeals) {
            mealAdapter.addMeal(meal);
        }
        updateTotalValues();
    }

private List<FoodItem> loadTodaysMealsFromDatabase() {
        String currentDate = dateFormat.format(calendar.getTime());
        List<FoodItem> meals = foodItemDao.getMealsByDate(currentDate);
        Log.d("Database", "Loaded meals: " + meals.size());
        return meals;
    }

private class SwipeToDeleteCallback extends ItemTouchHelper.SimpleCallback {
        SwipeToDeleteCallback() {
            super(0, ItemTouchHelper.LEFT);
        }
        @Override
        public boolean onMove(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder, @NonNull RecyclerView.ViewHolder target) {
            return false;
        }
        @Override
        public void onSwiped(@NonNull RecyclerView.ViewHolder viewHolder, int direction) {
            int position = viewHolder.getAdapterPosition();
            FoodItem deletedMeal = mealAdapter.getMeals().get(position);
            deleteItem(deletedMeal);
            updateTotalValues();


        }
    }

 private void deleteItem(FoodItem foodItem) {
        AppDatabase database = AppDatabase.getInstance(this.getApplicationContext());
        database.foodItemDao().delete(foodItem);
        Log.d("Database", "Deleted meal: " + foodItem.getMealName());
        mealAdapter.removeMeal(foodItem);
        mealAdapter.notifyDataSetChanged();
        updateTotalValues();
}

........
builder.setPositiveButton("Add", (dialog, which) -> {
                    int selectedQuantity = getSelectedQuantity(radioGroupQuantities);
                    FoodMenuItem selectedMeal = menuAdapter.getSelectedMeal();
                    if (selectedMeal != null && selectedQuantity > 0) {
                        String currentDate = dateFormat.format(calendar.getTime());
                        FoodItem mealToAdd = calculateMealForQuantity(selectedMeal, selectedQuantity);
                        mealToAdd.setDate(currentDate);

                                    foodItemDao.insert(mealToAdd);

                                mealAdapter.addMeal(mealToAdd);
                                updateTotalValues();

                    }

private void updateTotalValues() {
        List<FoodItem> meals = mealAdapter.getMeals(); // Get the list of meals from the adapter
        int totalKcal = 0;
        double totalFats = 0;
        double totalCarbs = 0;
        double totalProteins = 0;

        for (FoodItem meal : meals) {
            totalKcal += meal.getKcal();
            totalFats += meal.getFats();
            totalCarbs += meal.getCarbs();
            totalProteins += meal.getProteins();
        }

        // Update the TextView with the total values
        txtViewTotal.setText("Total - " + totalKcal + "kcal " +
                totalFats + "g fats " +
                totalCarbs + "g carbs " +
                totalProteins +"g proteins");
    }

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật