Commit Graph

11 Commits

Author SHA1 Message Date
805f982ccf Add graph button to start plan - 1.164 🚀 2023-10-24 16:24:56 +13:00
90006d3b82 Only show loading on GraphsList on pull-down 2023-10-18 09:59:46 +13:00
adbc87f462 Prevent list jitter on graphs - 1.157 🚀
If we always refresh on focus then we will
be making many redundant requests, as well as
causing the list to jump around whenever we
navigate back/forward.
The only downside to this is occasionally the
data may be stale, however the user can just
pull down on the list to refresh.

Closes #165
2023-09-07 16:52:50 +12:00
0ba7616ea2 Prevent empty graphs flickering
If `bests` is always an empty array then our logic
for detecting zero graphs is wrong. Now when we haven't
loaded any data `bests` is undefined instead of []
2023-08-29 11:55:21 +12:00
7eabe63198 Fix offset in GraphsList 2023-08-29 11:30:25 +12:00
103ae5587d Add missing keyExtractors 2023-08-29 11:22:15 +12:00
6b524dce34 Revert "Change way we detect set updates"
This reverts commit 185ebd1824.
2023-08-28 18:12:15 +12:00
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
da17f8899c Paginate graphs
Also factor out LIMIT constant
2023-08-14 10:42:15 +12:00
c97ba1151e Optimize GraphsList
Instead of getting a list of max weights,
then looping in JS to run SQL queries for max
reps, use a subquery.
2023-08-12 15:03:31 +12:00
1603496424 Rework Best -> Graphs
I was considering adding weight tracking,
so then this graph page would include body
weight graphs. Meaning it's not really
recording the "best" of anything.
It currently only shows the best on the list
page anyway.
2023-07-04 11:35:52 +12:00