Commit Graph

79 Commits

Author SHA1 Message Date
Roland Geider
b277e81088 Detect a sync stream that is blocked on the network path
This might help debugging when an ad-blocker, vpn or similar interferes with
the connections to the sync service

See #1271
2026-07-23 14:56:29 +02:00
Roland Geider
db98af0ac7 Make sure the code can work with nullable routines in workout logs 2026-07-17 18:25:22 +02:00
Mustafa Senoglu
0a42125285 chore: regenerate database.g.dart for nullable routineId 2026-07-10 12:43:45 +03:00
Mustafa Senoglu
cc483f3dae fix: make routineId nullable in WorkoutLogTable to prevent crash
Server allows workout logs without a routine (free/ad-hoc logging),
but the app's Drift table declared routineId as non-nullable.
This caused a null check operator crash when PowerSync delivered
a row with routine_id = NULL.

Changes:
- WorkoutLogTable.routineId: integer() → integer().nullable()
- Log.routineId: late int → int?
- Log constructor: required this.routineId → this.routineId
- Log.toCompanion: handle null routineId with Value.absent()

Fixes #1250
2026-07-09 14:15:04 +03:00
Roland Geider
60c9f67282 Move shared infra to lib/core/ 2026-07-01 20:28:06 +02:00
Roland Geider
a46bd22025 Move account feature to lib/features/account/ 2026-07-01 18:28:10 +02:00
Roland Geider
8b929b23c1 Move routines feature to lib/features/routines/ 2026-07-01 18:22:50 +02:00
Roland Geider
33fbe279ca Move nutrition feature to lib/features/nutrition/ 2026-07-01 17:57:49 +02:00
Roland Geider
08fe476e5b Move exercises feature to lib/features/exercises/ 2026-07-01 17:45:43 +02:00
Roland Geider
21ea4dbc54 Move gallery feature to lib/features/gallery/ 2026-07-01 17:30:11 +02:00
Roland Geider
ae513e3566 Move trophies feature to lib/features/trophies/ 2026-07-01 17:21:18 +02:00
Roland Geider
ae81c32a23 Move weight feature to lib/features/weight 2026-07-01 16:55:09 +02:00
Roland Geider
e8951ca8cb Refactor session models and their use in forms
We now either pass the existing workout session to edit, or null if we want
to add a new entry
2026-07-01 10:59:52 +02:00
Roland Geider
341dec6d99 Fix avoid_slow_async_io lint warning 2026-06-15 22:48:11 +02:00
Roland Geider
6242723a17 Recreate generated files 2026-06-15 21:07:13 +02:00
Roland Geider
efaa5121c5 Fix column types 2026-06-14 20:24:49 +02:00
Roland Geider
30df030e1e Add converter for date-only fields, otherwise comparisons break 2026-06-14 16:19:02 +02:00
Roland Geider
e93c4effcb Exercise IDs are integers, not text 2026-06-05 23:17:25 +02:00
Roland Geider
675fb44c6e Also properly handle (for now) unused datetime fields 2026-06-05 15:36:19 +02:00
Roland Geider
662ad9befc Properly handle timezones 2026-06-05 15:17:32 +02:00
Roland Geider
b04db2351e Remove unused code 2026-06-04 22:33:49 +02:00
Roland Geider
fb74e255d4 Remove dependency on wgerBaseProvider
This was causing some circular dependency problems
2026-06-02 19:46:33 +02:00
Roland Geider
8f562e5d83 Properly handle exercise videos
These need to be loaded with mediaUrlBuilderProvider, like the exercise images
2026-05-27 17:22:35 +02:00
Roland Geider
400b21065a Add brand to the model 2026-05-26 15:15:16 +02:00
Roland Geider
1009477553 Fix behaviour on logout
We were previously dropping the local db on logout, which could also happen when
the user was too long offline to fetch a new token. Now this only happens when the
user manually logs out, or during login and there's the db from a previous, different,
user.
2026-05-25 20:52:23 +02:00
Roland Geider
ea3087792c Merge branch 'feature/allauth' into feature/offline-mode 2026-05-22 22:30:45 +02:00
Roland Geider
1b72fb71ad Fix circular provider dependency 2026-05-22 22:14:45 +02:00
Roland Geider
fe5c7bb0ef Regenerate build files 2026-05-22 20:18:49 +02:00
Roland Geider
8fc149741f Edit the user's email via allauth's endpoints 2026-05-22 20:10:47 +02:00
Roland Geider
87a40fd4e6 Switch the pasted-token field from DRF tokens to refresh tokens 2026-05-22 20:08:43 +02:00
Roland Geider
af8ed102eb Also write to the user profile via powersync 2026-05-22 17:59:16 +02:00
Roland Geider
d0c56c42eb Re-probe the connection to the wger server itself
This is actually the "real" connectivity test, since we need a backend to talk to
2026-05-22 15:52:23 +02:00
Roland Geider
25b444103f Correctly load the notes and aliases for exercises 2026-05-20 16:34:21 +02:00
Roland Geider
f8187b293f Cleanup exercise models
Save the dependant object (such as language), and not the ID as well as the object.
2026-05-20 16:10:27 +02:00
Roland Geider
4866551ef4 Move exercises and their translations to RawTables
This was causing some delays since we always load all exercise data upfront
and this was causing a noticeable delay.
2026-05-20 15:05:45 +02:00
Roland Geider
944b27e38e Also sync all the license information, even if we don't expose all of that right now 2026-05-15 13:03:16 +02:00
Roland Geider
1ec921faf3 Consistent usage of uuid IDs
Now these fields are always nullable on the model and get a value once they
are persisted to the (local) database.
2026-05-03 12:17:23 +02:00
Roland Geider
c1dccbd822 Make the "impression" in workout session an enum
This is cleaner and simplifies a handful of places
2026-05-03 12:17:23 +02:00
Roland Geider
d6affe4036 Sync the rest of the nutrition tables with powersync 2026-05-02 12:36:08 +02:00
Roland Geider
cf13af1740 Sync the rest of the nutrition tables to powersync 2026-05-01 20:24:26 +02:00
Roland Geider
209ab7cbbe Add gallery sync tables 2026-05-01 15:25:31 +02:00
Roland Geider
d1f6fc2dfe Sync nutritional logs 2026-04-30 18:10:02 +02:00
Roland Geider
d6e652f2c9 Sync the ingredient weight units to the local sqlite db 2026-04-30 13:41:58 +02:00
Roland Geider
c5ac06309b Properly mark columns as nullable 2026-04-30 12:00:05 +02:00
Roland Geider
d135e81d4f Cache ingredient and exercise images on device 2026-04-30 10:48:20 +02:00
Roland Geider
5bf2dd22ee Properly load the ingredient images 2026-04-29 20:53:50 +02:00
Roland Geider
680127e139 Sync the base Routine and Nutritional plan entries via powersync
This makes sure the lists is always kept current and allows the user to edit
them offline as well. Note that we still kepp the backend's ID here, so no
creation is possible.
2026-04-29 10:03:59 +02:00
Roland Geider
c59fd68fe7 Pass the userID and the expiration to the PowerSync credentials 2026-04-20 17:06:35 +02:00
Roland Geider
e8e0cc53bb Remove the uuid column in the weight table, this doesn't exist anymore 2026-04-20 17:05:14 +02:00
Roland Geider
fdce3bf9a9 Rename file with the wger base provider 2026-04-18 19:05:42 +02:00