Commit Graph

130 Commits

Author SHA1 Message Date
1b1bb41ed7 Combine SetForm + EditSet
The abstraction here added more complexity than it saved.
2022-11-30 13:58:56 +13:00
8019df7418 Add some useCallbacks 2022-11-03 23:32:41 +13:00
29d14d74ff Fix rest timers for new sets from homepage 2022-11-03 22:16:18 +13:00
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
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
bc7aca03e8 Remove semicolons from line endings 2022-10-31 17:22:08 +13:00
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
e6dcd4a47e Use hermes engine
https://reactnative.dev/docs/hermes
2022-10-28 18:36:47 +13:00
859fa2a89f Add setting to disable sound on rest timers
Closes #50
2022-10-27 17:28:27 +13:00
80b1a1ef56 Fix single views for new custom headers 2022-10-23 19:13:58 +13:00
b95024abe0 Fix rest timers for newly edited Workouts
Previously if you were to add a new workout, then
add a set for that workout immediately afterwards,
the rest timers would be the default 3:30.
Now, they are the actual value set when creating the
workout.
2022-10-21 18:39:06 +13:00
4d35d617e8 Change wording on new record notification 2022-10-16 14:37:31 +13:00
46f0875497 Create useSnackbar custom hook 2022-10-14 17:27:19 +13:00
228383ed23 Bottom align save button on set form 2022-10-13 16:32:12 +13:00
3cbabb723a Add sessions page
Related to #82
2022-10-05 23:38:52 +13:00
b0b804eae1 Use react context for settings
Closes #81
2022-10-01 16:01:07 +13:00
edf823ca8b Prevent title counting sets when we aren't predicting them 2022-10-01 15:35:20 +13:00
9d42760dff Rename some variables in EditSet
Not sure if I like the look of variables starting with
underscores. Perhaps the only use of this would be to prevent
editor warnings for unused variables.
2022-10-01 13:30:06 +13:00
a20a0a1832 Add timer page
Closes #54
2022-09-26 14:38:25 +13:00
235b806eeb Fix counting current progress in a workout 2022-09-25 19:06:16 +13:00
71d223f0a1 Add current workout progress to title of set editing
Related to #48

Should be thoroughly tested before closing.
2022-09-24 19:09:58 +12:00
39fafa353f Split out some type definitions into their own files 2022-09-24 18:47:31 +12:00
0bc644a1ba Add setting to show/hide unit field
Closes #34
2022-09-21 13:51:29 +12:00
85dd2b6d17 Move rest timer and sets per session settings to Workouts
Closes #32
2022-09-21 11:50:20 +12:00
052d000e12 Make padding & margin consistent everywhere. 2022-09-16 21:07:02 +12:00
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
d5c97b45b0 Revert "Show count when adding a new set"
This reverts commit 4aa91253a1.
2022-09-09 15:32:47 +12:00
4aa91253a1 Show count when adding a new set 2022-09-08 22:33:32 +12:00
e3b3c6ca09 Split out database logic into service files 2022-09-04 16:56:46 +12:00
259d36d67f Move all database operations into db.ts 2022-09-04 15:28:21 +12:00
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
61b263edcc Remove created field from EditSet update 2022-09-03 15:43:03 +12:00
756a2089e9 Prevent race condition with database migrations 2022-08-30 23:21:25 +12:00
f6dec0c3b2 Add images to sets 2022-08-28 20:55:12 +12:00
0b084f37ff Set version 36006 2022-08-28 17:25:31 +12:00
3e71be42db Reduce duration of new record toast 2022-08-27 18:09:45 +12:00
4967cbf728 Disable new record notifications by default 2022-08-27 18:08:23 +12:00
51ed36e30a Customize header title for EditPlan and EditSet 2022-08-26 15:17:45 +12:00
48d4d59ac8 Add ability to choose alarm sound
Closes #5
2022-08-25 20:41:15 +12:00
2c9242b03f Use react-native-paper snackbar instead of ToastAndroid 2022-08-25 13:01:01 +12:00
bc3a39c4b6 Show list of current workouts when adding set 2022-08-24 15:36:49 +12:00
29705d5e72 Add toast for new records 2022-08-24 13:04:45 +12:00
0dcfc8eadf Show next workout on EditSet page 2022-08-24 12:46:47 +12:00
75b71b5851 Replace usage of react-native-async-storage with sqlite 2022-08-24 12:01:39 +12:00
4c185f0346 Add vibration setting for timers 2022-08-20 16:37:59 +12:00
6eacddf2d0 Use strftime in sqlite instead of new date
The javascript date method was messing up the timezones.
2022-08-18 12:08:03 +12:00
e191323fff Factor out EditSet and SetForm 2022-07-20 15:48:48 +12:00
e9e7651d65 Auto focus reps and keep keyboard open 2022-07-20 15:22:56 +12:00
9e790e7e1d Fix error when adding set at the end of a plan 2022-07-19 17:02:50 +12:00
c965064e57 Use best as default for EditSet 2022-07-19 14:26:00 +12:00
0f540cc778 Remove autoFocus from EditSet
Feels weird having auto focus on a new screen
2022-07-11 12:59:38 +12:00
039de1fbd3 Fix linting errors 2022-07-11 12:32:13 +12:00
e72cdc8db7 Make plans use stack navigation 2022-07-11 12:28:30 +12:00
c31a3b2a10 Add bottom margin to date picker in EditSet 2022-07-11 00:16:03 +12:00
8311f5098c Fix linting errors 2022-07-11 00:06:48 +12:00
f15c6df20b Use stack navigation for homepage + EditSet 2022-07-11 00:04:13 +12:00
5f840e6d83 Remember previous add set 2022-07-10 16:22:19 +12:00
027dd88574 Make EditSet scroll 2022-07-09 17:13:13 +12:00
f2d5166c8a Add ability to edit created on sets 2022-07-09 16:38:57 +12:00
f4a9bceb61 Create separate edit/add set displays 2022-07-09 15:57:58 +12:00
25ce5d9aac Prevent setting timer on update 2022-07-09 15:37:22 +12:00
d1e3255a28 Allow zero reps/weight but not null 2022-07-09 15:29:36 +12:00
cd11332d2d Fix shown date in EditSet for new set 2022-07-09 15:27:14 +12:00
91286a235c Allow empty fields in EditSet 2022-07-09 15:26:37 +12:00
e417897bb7 Reduce amount of state in EditSet 2022-07-08 20:29:31 +12:00
60bfb9664f Fix copy button for set on homepage 2022-07-08 18:21:14 +12:00
025296d24b Store dates as ISO string
UTC string has a comma in it, so it messes up
CSV exports.
2022-07-08 18:02:10 +12:00
bddd7cb869 Save dates as UTC 2022-07-08 15:16:32 +12:00
dc21f1266e Fix add button in homepage 2022-07-08 14:43:31 +12:00
40447880ca Remove console.log in EditSet 2022-07-08 14:33:47 +12:00
376ca81e09 Reduce amount of state used by EditSet and Home 2022-07-08 13:51:14 +12:00
1d68ba86f5 Remove useFocusEffect
It was lagging the app out.
2022-07-07 15:13:44 +12:00
570b43715f Ensure only one connection to SQLite exists 2022-07-07 14:18:38 +12:00
ecb436f8a6 Add progress to plans 2022-07-07 12:45:45 +12:00
07fa6f7ab2 Switch some modals to dialogs and fix light mode 2022-07-06 21:03:56 +12:00
e4ed53c358 Move logic of TimerService into TimerBroadcast
This was supposed to solve the timer stopping sometimes
when the application was in the background.
It was actually stopping because of battery optimizations.
2022-07-06 16:27:36 +12:00
47af169ca6 Add fab to home page 2022-07-05 12:43:23 +12:00
06e9bd72a4 Prevent alarm being set after deleting 2022-07-04 23:09:41 +12:00
5a1257a859 Move to top bar navigation 2022-07-04 16:03:48 +12:00
bb9a6c5f37 Add basic CRUD for sets 2022-07-03 13:50:01 +12:00