Commit Graph

134 Commits

Author SHA1 Message Date
Brandon Presley 667b96ec33 Start simplifying Switch.tsx 2022-12-24 19:49:43 +13:00
Brandon Presley d088cf313b Remove log from SettingsPage 2022-12-24 19:35:20 +13:00
Brandon Presley c2f98046cc Add update log to SettingsPage 2022-12-24 19:32:14 +13:00
Brandon Presley a69bfd62a6 Use react-hook-forms on SettingsPage
This greatly reduces our lines of code.
Also I thought it might improve performance
to address #135 but it didn't make any difference.
2022-12-24 18:19:35 +13:00
Brandon Presley 27b7e91e91 Factor out buttons in SettingsPage 2022-12-24 13:36:11 +13:00
Brandon Presley fc6f5e3b53 Add missing key prop to SettingsPage 2022-12-24 13:18:03 +13:00
Brandon Presley 777eddf943 Remove usage of FlatList in Settings page
Doing so looks like it improved the performance
of the switches.

Related to #135.
2022-12-22 19:18:44 +13:00
Brandon Presley 42589fe9ab Fix column reference in settings page 2022-12-10 22:22:51 +13:00
Brandon Presley 3600003660 Clear set images + alarm when importing a database
Closes #131
2022-12-10 22:19:55 +13:00
Brandon Presley 0b2d4d52e1 Add export/import database buttons to search 2022-12-08 13:22:02 +13:00
Brandon Presley 0b6471a766 Add ability to export/import SQLite database 2022-12-08 13:18:41 +13:00
Brandon Presley 96674cd51f Clean unused import from SettingsPage 2022-12-01 15:52:44 +13:00
Brandon Presley 567e885e76 Make best view select consistent with SettingsPage 2022-12-01 15:51:39 +13:00
Brandon Presley a284f045d2 Add left padding to settings selects 2022-12-01 15:45:18 +13:00
Brandon Presley 1016997269 Fix width of alarm sound in SettingsPage 2022-12-01 15:26:41 +13:00
Tiffany Barclay a3e0ba84cb Change width of select label 2022-11-30 20:47:16 +13:00
Brandon Presley c4aad7beb5 Remove colon from alarm sound label 2022-11-30 15:19:31 +13:00
Brandon Presley de4c8081a6 Add labels to selects 2022-11-30 15:15:19 +13:00
Brandon Presley 8e31dc2186 Add labels to colors 2022-11-30 14:32:42 +13:00
Brandon Presley 4375a9c24e Simplify process of enabling rest timers 2022-11-30 14:23:36 +13:00
Brandon Presley dc27ae9868 Split up dark and light color settings
Previously it was possible to choose a color combination
that was almost impossible to read (due to contrast).
Now we have prevented this from happening, as well as
giving the user more customizability.
2022-11-26 13:15:12 +13:00
Brandon Presley be4098962e Add settings module for android 2022-11-21 18:15:43 +13:00
Brandon Presley 29cbc43534 Use first item for Select.tsx if no value is found 2022-11-21 17:54:45 +13:00
Brandon Presley 38332c193c Fix settings page crashing
Select.tsx was crashing if it couldn't
find a label for the selected value.
2022-11-20 21:47:05 +13:00
Brandon Presley 157a26b843 Remove margin bottom from flatlist on settings 2022-11-16 18:32:59 +13:00
Brandon Presley 6012747643 Merge branch 'master' of gitea.presley.nz:brandon.presley/Massive 2022-11-16 18:30:21 +13:00
Brandon Presley a1b240caae Add margin between settings list and selects 2022-11-16 18:27:58 +13:00
Brandon Presley 3528ba593f Finish removing react-native-picker-select
Replaced with react-native-paper menus.
2022-11-16 18:17:59 +13:00
Brandon Presley e7e2f299da Start moving select dropdowns to use menus 2022-11-16 18:01:40 +13:00
Brandon Presley 19ec8ac5e9 Fix margins for settings page 2022-11-16 17:10:31 +13:00
Brandon Presley 58ab135b09 Remove default coloring of selects for SettingsPage 2022-11-16 17:07:43 +13:00
Brandon Presley 261f1c8bf0 Fix colors of selects in settings 2022-11-16 14:46:45 +13:00
Brandon Presley 162d67c351 Start work on pickers that work on android+ios 2022-11-15 19:51:15 +13:00
Brandon Presley 401ce5d2b8 Disable 24 hour checking and battery for ios 2022-11-14 21:42:37 +13:00
Brandon Presley 3dea1e952c Fix default date in SettingsPage 2022-11-14 14:27:50 +13:00
Brandon Presley 9bfe9737ea Fix lint issues 2022-11-12 16:02:16 +13:00
Brandon Presley c51bfbd852 Use date-fns and detect 12/24 hour device setting
Related to #116
2022-11-12 14:38:39 +13:00
Brandon Presley f87373479a Attempt to optimize SettingsPage
1. Use FlatList instead of ScrollView
2. Wrap `switches` in a `useMemo` call

I didn't measure it but felt like this sped up
performance slightly. Still might come back to this
page again in the future.

Closes #111
2022-11-07 14:30:25 +13:00
Brandon Presley ae84228913 Remove showSets setting 2022-11-05 17:31:18 +13:00
Brandon Presley f7c895f608 Fix not remembering settings sound 2022-11-03 21:58:33 +13:00
Brandon Presley 0ed3b9817c Add lighter purple color option 2022-11-02 12:36:48 +13:00
Brandon Presley 18eaa9fc14 Adjust spacing of SettingsPage 2022-11-02 12:28:11 +13:00
Brandon Presley 949b435853 Split up state for SettingsPage
This improved performance when visually
toggling an option
2022-11-01 18:58:09 +13:00
Brandon Presley 31f1528c35 Replace settings context with theme context
The settings context was having a big performance
impact on the app. We only truly need the theme + color
to be a global context.
2022-11-01 16:50:03 +13:00
Brandon Presley 8d7fe149f5 Remove unused code 2022-11-01 16:11:39 +13:00
Brandon Presley fadab1f30b Fix colors of pickers in SettingsPage 2022-11-01 16:06:25 +13:00
Brandon Presley 49b5eb48c6 Refactor MassiveSnack
Instead of using a context for the whole app
use DeviceEventEmitter with root state.
This will probably improve performance,
since I think the react context was
re-rendering the entire DOM tree.
2022-11-01 15:55:37 +13:00
Brandon Presley 1a53fa324b Remove redundant Color context
Settings already stores the color set by the user.
2022-10-31 21:32:33 +13:00
Brandon Presley 13ca9cef3e Reword "maximum" as "target" for sets
There isn't any restriction involved in the sets
for each workout, it's more like a guide.
2022-10-31 21:00:53 +13:00
Brandon Presley bdb27894f7 Optimize root context 2022-10-31 21:00:10 +13:00