In this PR I'm implementing a way for users to add their own food. They will have to go to search and, when looking for anything, the first item that will appear can be tapped to open the new Add Food screen.
Configure Typescript for the new feature. I'm bringing static typing to the project. I made an early attempt trying to port the whole project while updating RN version and I failed miserably. I'm now doing it iteratively and it works like a charm so far.
Create a new AddFood screen and derived components. We now have actions to fetch and store all custom food items. Images are stored in user-defaults/shared-preferences in base64 format, it's not pretty but it'll have to do for now. Fixes #63
Make FoodRow margin bottom a little larger to fix the issue in Android with shadows for the last row. Fixes #56
Redo the safe area handling. Instead of relying on the SafeAreaView default implementation I'm using a library that gives me actual lengths. With that I can now show an extended TopAppBar in iOS where it merges smoothly with the status bar. So far so good. Fixes #66
Fix an old issue when tapping on a food item when the keyboard was open. It now selects the item instead of waiting for the keyboard to close and forcing the user to tap a second time. Thanks to keyboardShouldPersistTaps.
Change the design of the accept button to be more like a capsule instead of filling the whole screen.
In this PR I'm implementing a way for users to add their own food. They will have to go to search and, when looking for anything, the first item that will appear can be tapped to open the new Add Food screen.
keyboardShouldPersistTaps
.