Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Copy meals to today from Diary #130

Conversation

doktormerlin
Copy link
Contributor

Hi!

I've created a new feature for this app which allows you to copy IntakeEntity objects from one day (which is not today) to today.

This helps greatly when cooking on one day for dinner and taking the leftovers on the next day.

To accomplish the task, I created the following flow:

  • When in the diary and the selected day is TODAY everything is as always
  • When in the diary on another day and you press and hold a food item, there is a new dialog opening from which you can select:
    • Do you want to copy to today?
    • Or do you want to delete?
  • If selecting delete, the already known dialog opens
  • If selecting "Copy to today", a new dialog opens on which you can select the meal you want to copy to, since you often want to change e.g. dinner to lunch.

For now I only added this functionality to meals, not to activities. Activities might also be useful if you want to track e.g. your daily commute by bike. I might add that later.

Here are some screenshots of the new dialog:

The new dialog asking what you want to do

The new dialog to copy meal to

The dropdown menu expanded for meal selection

@doktormerlin
Copy link
Contributor Author

I'm not 100% fine with the copy-function using "MealDetailBloc", I think the AddIntake could be outsourced to the utils-folder somehow, but my Dart knowledge isn't high enough for this to know how to do it correctly without breaking something

@doktormerlin doktormerlin changed the title Feature/copy meals without appname change Feature: Copy meals to today from Diary Dec 19, 2024
@simonoppowa simonoppowa changed the base branch from main to develop December 19, 2024 15:33
Copy link
Owner

@simonoppowa simonoppowa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great Addition, thank you

@simonoppowa simonoppowa merged commit 0637043 into simonoppowa:develop Dec 19, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants