Commit Graph

202 Commits

Author SHA1 Message Date
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
Brandon Presley bc7aca03e8 Remove semicolons from line endings 2022-10-31 17:22:08 +13:00
Brandon Presley b7f1c2192e Pause converting to typeorm due to odd error
ERROR  TypeError: Cannot read property 'getItem' of undefined

This error is located at:
    in FlatList (created by SetList)
    in RCTView (created by View)
    in View (created by Page)
    in Page (created by SetList)
    in SetList (created by SceneView)
...

I found an open issue on the react-native github which seems
related https://github.com/facebook/react-native/issues/31523
but after following all of their suggestions I still have the
same error. I tried:
- Removing @babel/plugin-proposal-class-properties & @babel/plugin-transform-flow-strip-types
- Adding @babel/plugin-transform-flow-strip-types
2022-10-31 13:20:36 +13:00
Brandon Presley 463852e6a6 Prevent double searching everywhere
Also change variable names. Search should represent the
act of searching, rather than the value being typed by the user.
2022-10-28 18:59:54 +13:00
Brandon Presley e6dcd4a47e Use hermes engine
https://reactnative.dev/docs/hermes
2022-10-28 18:36:47 +13:00
Brandon Presley ac0af26f77 Add more date format options
Closes #94
2022-10-28 15:49:03 +13:00
Brandon Presley 859fa2a89f Add setting to disable sound on rest timers
Closes #50
2022-10-27 17:28:27 +13:00
Brandon Presley 80b1a1ef56 Fix single views for new custom headers 2022-10-23 19:13:58 +13:00
Brandon Presley 36e6637ba2 Revert "Revert "Add custom app bar""
This reverts commit e84dd7bdea.
2022-10-23 12:35:58 +13:00
Brandon Presley e84dd7bdea Revert "Add custom app bar"
This reverts commit a664b65ce2.
2022-10-23 12:32:44 +13:00
Brandon Presley a664b65ce2 Add custom app bar
The header bar provided by react-navigation was jumping on first
load, whereas this custom one doesn't.
2022-10-23 12:24:39 +13:00
Brandon Presley c73937396e Fix defaults for freshly installed app
Closes #95
2022-10-18 21:43:46 +13:00
Brandon Presley 77db34b310 Add toggle for hiding maximum set count
Closes #90
2022-10-16 16:54:20 +13:00
Brandon Presley 46f0875497 Create useSnackbar custom hook 2022-10-14 17:27:19 +13:00
Brandon Presley 8461f86e88 Wrap color context with useColor custom hook
I find it easier to import hooks by useX instead of
useContext(X). Like how the navigation library is just
useNavigation
2022-10-14 17:24:02 +13:00
Brandon Presley 3cbabb723a Add sessions page
Related to #82
2022-10-05 23:38:52 +13:00
Brandon Presley eb53d58991 Add ability to set app theme
Closes #79
2022-10-04 14:35:56 +13:00
Brandon Presley c65bbf948f Add hh:mm format to date setting 2022-10-02 19:14:10 +13:00
Brandon Presley 93878f14e4 Fix image on new set prediction 2022-10-02 19:07:52 +13:00
Brandon Presley ba3ed2a272 Revert "Revert "Add setting for showing date by default""
This reverts commit e1b7e80e2f.
2022-10-02 18:07:43 +13:00
Brandon Presley a5c70050a7 Revert "Revert "Add setting for date format""
This reverts commit 3691c729b4.
2022-10-02 18:04:36 +13:00
Brandon Presley b0b804eae1 Use react context for settings
Closes #81
2022-10-01 16:01:07 +13:00
Brandon Presley ee76864a16 Fix margin differences in Settings page 2022-09-29 14:52:38 +13:00
Brandon Presley 374cbdf45d Add set prediction settings
Closes #51
2022-09-29 14:44:01 +13:00
Brandon Presley 3691c729b4 Revert "Add setting for date format"
This reverts commit 023041b846.
2022-09-26 19:13:48 +13:00
Brandon Presley e1b7e80e2f Revert "Add setting for showing date by default"
This reverts commit e8715162a0.
2022-09-26 19:13:24 +13:00
Brandon Presley e8715162a0 Add setting for showing date by default
Closes #52
2022-09-26 19:02:25 +13:00
Brandon Presley 023041b846 Add setting for date format 2022-09-26 18:23:06 +13:00
Brandon Presley 91c0430760 Factor out massive switch 2022-09-26 16:10:13 +13:00
Brandon Presley 5e1a6c42cd Swap theme and sound options in SettingsPage
Closes #53
2022-09-25 23:51:05 +13:00
Brandon Presley ce0297dce6 Make settings page more compact 2022-09-25 18:35:30 +13:00
Brandon Presley d38d2a59b4 Add white and black themes 2022-09-25 17:43:29 +13:00
Brandon Presley b5b4aa8666 Split out colors 2022-09-25 17:32:49 +13:00
Brandon Presley 3509aa93f3 Add setting to hide steps 2022-09-24 17:29:52 +12:00
Brandon Presley 3e4dfa5c80 Add setting to hide workouts from edit set
Closes #43
2022-09-24 17:23:15 +12:00
Brandon Presley 462a7f09bc Fix settings forgetting show unit
Closes #47
2022-09-24 17:12:58 +12:00
Brandon Presley 686666b953 Get unit in settings page from sqlite 2022-09-24 16:55:41 +12:00
Brandon Presley e516cdfdc0 Add ability to customize primary color
Closes #40
2022-09-24 13:57:51 +12:00
Brandon Presley 0bc644a1ba Add setting to show/hide unit field
Closes #34
2022-09-21 13:51:29 +12:00
Brandon Presley 85dd2b6d17 Move rest timer and sets per session settings to Workouts
Closes #32
2022-09-21 11:50:20 +12:00
Brandon Presley be3bb8a189 Reword tooltip when toggling set predictions
Closes #24
2022-09-18 18:11:09 +12:00
Brandon Presley 0bc92e1539 Add snackbar for images setting 2022-09-16 21:38:37 +12:00
Brandon Presley 052d000e12 Make padding & margin consistent everywhere. 2022-09-16 21:07:02 +12:00
Brandon Presley 5177a79b5c Search settings page case insensitively 2022-09-11 15:41:15 +12:00
Brandon Presley 567bf182b4 Change toasts based on context of settings
The messages should explain what you have now changed
rather than the setting itself.
2022-09-11 15:35:20 +12:00
Brandon Presley 1a83b20069 Reduce redundancy of SettingsPage 2022-09-11 15:22:18 +12:00
Brandon Presley e3b3c6ca09 Split out database logic into service files 2022-09-04 16:56:46 +12:00
Brandon Presley 259d36d67f Move all database operations into db.ts 2022-09-04 15:28:21 +12:00
Brandon Presley 607f83955d Replace react context with let statement in db.ts
1. I can't easily import context with my editor.
2. It's extra complexity everyone has to understand.
3. I hate the antichrist.
2022-09-04 14:05:25 +12:00
Brandon Presley 2729f86fb3 Put rest minutes & seconds on the same row 2022-09-02 14:01:25 +12:00
Brandon Presley 6b617d974f Replace react-native imports of Text with react-native-paper 2022-09-01 23:43:53 +12:00
Brandon Presley 137ecf4a77 Add show images setting 2022-09-01 13:06:49 +12:00
Brandon Presley 756a2089e9 Prevent race condition with database migrations 2022-08-30 23:21:25 +12:00
Brandon Presley a1cd4e8080 Improve requesting app runs in background 2022-08-30 23:06:39 +12:00
Brandon Presley d62e0c1df9 Fix notify on record displaying wrong on Settings 2022-08-28 19:10:01 +12:00
Brandon Presley 4967cbf728 Disable new record notifications by default 2022-08-27 18:08:23 +12:00
Brandon Presley fd38439756 Change color scheme 2022-08-26 13:54:51 +12:00
Brandon Presley 48d4d59ac8 Add ability to choose alarm sound
Closes #5
2022-08-25 20:41:15 +12:00
Brandon Presley 2c9242b03f Use react-native-paper snackbar instead of ToastAndroid 2022-08-25 13:01:01 +12:00
Brandon Presley c54396cb9c Make text inputs outlined 2022-08-25 12:35:09 +12:00
Brandon Presley 24a44056f9 Move minutes before seconds in settings page 2022-08-24 15:15:27 +12:00
Brandon Presley 75b71b5851 Replace usage of react-native-async-storage with sqlite 2022-08-24 12:01:39 +12:00
Brandon Presley 5d9a458ccd Add search bar to SettingsPage 2022-08-23 12:04:52 +12:00
Brandon Presley 4c185f0346 Add vibration setting for timers 2022-08-20 16:37:59 +12:00
Brandon Presley 3d51d4c077 Rename "Max sets" to "Sets per workout" 2022-07-21 13:54:53 +12:00
Brandon Presley 839d872c1c Shorten method names in AlarmModule 2022-07-19 16:38:58 +12:00
Brandon Presley c0b6ba8606 Move uploading/downloading/deleting into the top bar 2022-07-19 16:24:16 +12:00
Brandon Presley f2e5192002 Organize SettingsPage imports 2022-07-19 14:26:36 +12:00
Brandon Presley 3322289c17 Factor out MassiveSwitch 2022-07-17 13:45:31 +12:00
Brandon Presley a4855a41d9 Prepare for first release 2022-07-12 15:54:04 +12:00
Brandon Presley 039de1fbd3 Fix linting errors 2022-07-11 12:32:13 +12:00
Brandon Presley 6b8780c62e Add confirm dialog to deleting all data 2022-07-11 11:26:45 +12:00
Brandon Presley aa780172a4 Add max number of sets to settings page 2022-07-10 19:03:07 +12:00
Brandon Presley 530d6d6fb9 Add missing dep to SettingsPage 2022-07-10 18:00:06 +12:00
Brandon Presley af0ec285d3 Add info about predictive sets to settings page 2022-07-10 17:59:21 +12:00
Brandon Presley 29d2421fb1 Add toggle for predictive sets 2022-07-10 17:53:38 +12:00
Brandon Presley cba57e6e64 Use callbacks everywhere 2022-07-10 11:51:52 +12:00
Brandon Presley b81830a913 Remove alarmEnabled dependency from changeAlarmEnabled 2022-07-09 19:42:53 +12:00
Brandon Presley c3ce545508 Add ignoring dependency to changeAlarmEnabled 2022-07-09 19:42:10 +12:00
Brandon Presley 7b0929bef4 Use react-native libraries for Export and Import 2022-07-09 19:39:11 +12:00
Brandon Presley dbb3dc2eb3 Fix linting errors 2022-07-09 13:27:19 +12:00
Brandon Presley d73a88ed15 Replace default 3 with empty string for Settings minutes 2022-07-08 15:51:10 +12:00
Brandon Presley e9e3a59356 Remove awaiting from SettingsPage 2022-07-08 15:46:48 +12:00
Brandon Presley 6297bad812 Fix settings not saving 2022-07-08 15:45:24 +12:00
Brandon Presley 45c3029434 Change page naming scheme to ${word}Page 2022-07-08 15:20:03 +12:00