Skip to content

Move from PostMeal to PreMeal for New Meals #23

Open
@amalnanavati

Description

@amalnanavati

The app's current mealState is stored in cookies, which persist after meals. Therefore, if one meal finishes and the user closes the app, when they re-open the app for the next meal it will still be in PostMeal. However, we want it to start in PreMeal.

One way of addressing it is to have the app store the timestamp of the last state transition in global state. Then, before rendering either App.jsx or Home.jsx (TBD -- the assignee of this issue can make an informed decision about which) the app checks whether it is in PoseMeal and more than some time (2 mins?) has passed between the last state changed time and the current time. If so it changes the mealState from PostMeal to PreMeal.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcritical-pathIssues that are critical path for deployment

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions