If the load time is too fast (on a mid-tier device),
then for most people they will see a flicker of a
loading spinner (which looks like a bug). These indicators
would only marginally improve the experience of people with
the slowest devices, but for most people this will just look
like a bug.
I left the indicators in the InsightsPage since those queries
actually do take >=300ms on a mid-tier device.
I tried to maintain the current scroll position
within a list however this caused many issues
to do with outdated data, as well as performance issues.
Now we are going back to just refreshing any list on focus.
Closes#184
This simplifies our codebase greatly by
only having a single stack navigator and
a single drawer navigator. Previously we had
a stack navigator for every main page on the drawer.
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.
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.
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.
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).