Brandon Presley
386a9a7bb2
Pass whole updated set instead of just its id
...
Since we already have the whole updated set,
might as well pass it around instead of
re-fetching it.
2023-08-29 11:25:05 +12:00
Brandon Presley
da72692616
Add missing keyExtractor to SetList
2023-08-29 11:17:14 +12:00
Brandon Presley
82234a30a8
Reload specific set when edited
2023-08-28 18:11:03 +12:00
Brandon Presley
185ebd1824
Change way we detect set updates
...
Every time we create/update/delete fire a DeviceEventEmitter
event for gym sets. Then we subscribe to the changes in relevant
components.
Also fixed flickering of "No data yet" on graphs page.
2023-08-24 17:30:57 +12:00
Brandon Presley
f0d5fc4fa6
Fix infinite scrolling in homepage - 1.152 🚀
...
Also prevent flickering of "No sets found"
message on first load.
The infinite scrolling issue was a side-effect
of me messing with our memoization. Some places
didn't specify their deps properly.
2023-08-22 12:27:27 +12:00
Brandon Presley
de25cead60
Toggle selecting all - 1.151 🚀
2023-08-22 12:09:04 +12:00
Brandon Presley
24fd687856
Add custom event for settings being updated - 1.150
...
When we used navigation params to decide whether
or not to update the SetList, we broke reacting to
settings changes. This is because we used to update settings
whenever the user navigated to the page.
2023-08-22 11:43:35 +12:00
Brandon Presley
672931746b
Only reset SetList in certain situations
...
This reduces the jitter in the homepage
when you have scrolled down a significant
amount.
Related to #165 . Still need to do other
list pages.
2023-08-22 09:49:56 +12:00
Brandon Presley
dc5434991a
Pause adding multi-edit to workouts
...
Got up to the point where i'm find/replacing the
old names with new names, and I got confused
about the purpose of this feature.
2023-08-14 13:14:34 +12:00
Brandon Presley
da17f8899c
Paginate graphs
...
Also factor out LIMIT constant
2023-08-14 10:42:15 +12:00
Brandon Presley
f778426aba
Run prettier
...
Something happened with the deno formatter,
I can't remember what! Hahahahahaahahaha
2023-08-12 15:23:02 +12:00
Brandon Presley
4303fe2cc4
Use deno fmt instead of prettier
2023-06-27 15:16:59 +12:00
Brandon Presley
9c9a5fdd63
Trim search queries - 1.138
...
Closes #156
2023-06-13 14:18:49 +12:00
Brandon Presley
42912040ff
Simplify getNow
2023-01-04 13:24:49 +13:00
Brandon Presley
c7952738b5
Add selected title for plans + sets
...
Inspired by the stock Files app in Android.
2023-01-03 17:21:51 +13:00
Brandon Presley
27ff4861d9
Reduce logs in SetList
2023-01-01 14:18:27 +13:00
Brandon Presley
46dd50adfb
Pause adding unit tests
2022-12-30 13:25:47 +13:00
Brandon Presley
e5d9f5fa92
Add select all button
...
Very useful final addition to the multi edit/delete function.
Typically a user will search for certain criteria, and then select
them all to be removed/edited. For example, if yesterdays sets were all
10x150kg deadlifts, but you review your form video and decide the form
sucked, you would want to mass edit them to lower the weight/reps (or
maybe delete them). This way you won't have these invalid entries
ruining all your progress graphs (showing false progress).
2022-12-22 17:10:14 +13:00
Brandon Presley
f9e357ff80
Factor out list menu
2022-12-21 13:02:53 +13:00
Brandon Presley
f714941c88
Fix deleting a second time
...
Previously we didn't clear the id list.
This meant if you deleted multiple sets
multiple times, it would break.
2022-12-18 18:25:30 +13:00
Brandon Presley
fa19434e77
Refactor DrawerMenu
...
Closes #132
2022-12-18 13:23:10 +13:00
Brandon Presley
888ae576b0
Reduce state in SetList
...
The `set` state here was just a copy of the first element
of `sets`.
2022-12-18 12:48:20 +13:00
Brandon Presley
71d4ad805c
Add button to clear multi selection
2022-12-14 13:02:18 +13:00
Brandon Presley
2e347deb53
Add ability to edit/delete multiple sets/plans
2022-12-13 22:54:37 +13:00
Brandon Presley
c3b14e901d
Remove eslint ignore from SetList
2022-12-12 17:26:58 +13:00
Brandon Presley
1b9d35d71e
Reduce logging of SetList
2022-11-21 18:07:02 +13:00
Brandon Presley
f9449a9860
Fix default new sets
2022-11-04 16:02:06 +13:00
Brandon Presley
ba61e79808
Fix error loading set for adding
2022-11-04 15:51:58 +13:00
Brandon Presley
1110ccb741
Fix deleting first record bug
2022-11-03 21:58:10 +13:00
Brandon Presley
98c7fac75d
Fix adding new set on fresh installs
2022-11-03 19:21:59 +13:00
Brandon Presley
90fa309c09
Remove unused variable from SetList
2022-11-03 19:10:56 +13:00
Brandon Presley
a8fac1db69
Simplify adding from SetList
2022-11-02 15:46:45 +13:00
Brandon Presley
7a97b11e79
Remove React import from SetList
2022-11-01 20:01:04 +13:00
Brandon Presley
af9dcd0b13
Pass missing settings to SetItem from SetList
2022-11-01 16:54:14 +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
b782d66bf2
Fix adding new set from homepage
2022-10-31 20:59:40 +13:00
Brandon Presley
bc7aca03e8
Remove semicolons from line endings
2022-10-31 17:22:08 +13:00
Brandon Presley
e7321b6d8e
Add typeorm migrations
2022-10-31 17:05:31 +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
992b3d0ba6
Fix unit sometimes exporting as the string 'null'
2022-10-30 15:14:57 +13:00
Brandon Presley
6e75614d10
Add basic working unit tests
2022-10-30 12:56:58 +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
3d591f4618
Prevent searching twice on homepage first load
2022-10-28 18:41:17 +13:00
Brandon Presley
e6dcd4a47e
Use hermes engine
...
https://reactnative.dev/docs/hermes
2022-10-28 18:36:47 +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
9bd8fa9353
Replace height percent setting with flex: 1
...
This way reacts better to changing the screen sizes.
I think there was one bug where the fab wouldn't be
precisely at the bottom of the page depending on the
flat list length.
2022-10-14 18:12:21 +13:00
Brandon Presley
52f8241054
Prevent flickering of empty lists on slow devices
2022-10-13 16:30:02 +13:00