Commit Graph

90 Commits

Author SHA1 Message Date
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
Roland Geider
9a4fec8bf3 Refactor the workout session provider
The logs are read in the session repository, the logs one is only used
for CRUD operations
2026-04-18 18:19:31 +02:00
Roland Geider
0afb1026a9 Further refactor how the new providers fetch data 2026-04-18 17:06:44 +02:00
Roland Geider
c1a733b423 Clear the powersync database when a user logs out 2026-04-17 22:48:14 +02:00
Roland Geider
95fb6c6615 Migrate the nutrition provider to riverpod 2026-04-17 18:19:00 +02:00
Roland Geider
8ad3585ce6 Refactor the auth provider, and move it to riverpod 2026-04-17 16:25:04 +02:00
Roland Geider
70dff579d4 Fix tests 2026-04-17 15:46:34 +02:00
Roland Geider
0b9d3d59b9 Move exercise model to new variation structure 2026-04-17 12:34:51 +02:00
Roland Geider
6dea8d5e8f Merge branch 'master' into feature/offline-mode 2026-04-17 12:32:11 +02:00
Roland Geider
9c531a7799 Merge branch 'master' into feature/offline-mode
# Conflicts:
#	integration_test/1_dashboard.dart
#	integration_test/3_gym_mode.dart
#	ios/Podfile.lock
#	lib/database/exercises/exercise_database.dart
#	lib/database/exercises/type_converters.dart
#	lib/models/exercises/exercise.dart
#	lib/models/exercises/exercise.g.dart
#	lib/models/exercises/exercise_api.dart
#	lib/models/exercises/exercise_api.freezed.dart
#	lib/models/exercises/exercise_api.g.dart
#	lib/models/exercises/translation.dart
#	lib/models/exercises/translation.g.dart
#	lib/models/exercises/variation.dart
#	lib/providers/exercises.dart
#	lib/widgets/add_exercise/steps/step_1_basics.dart
#	lib/widgets/add_exercise/steps/step_2_variations.dart
#	lib/widgets/exercises/exercises.dart
#	lib/widgets/measurements/forms.dart
#	lib/widgets/routines/forms/slot.dart
#	pubspec.lock
#	pubspec.yaml
#	test/core/settings_test.mocks.dart
#	test/exercises/contribute_exercise_image_test.mocks.dart
#	test/exercises/contribute_exercise_test.mocks.dart
#	test/exercises/exercise_provider_load_test.dart
#	test/exercises/exercise_provider_test.dart
#	test/exercises/exercises_detail_widget_test.dart
#	test/exercises/exercises_detail_widget_test.mocks.dart
#	test/exercises/model_exercise_test.dart
#	test/measurements/measurement_entries_screen_test.dart
#	test/routine/gym_mode/gym_mode_test.dart
#	test/routine/gym_mode/gym_mode_test.mocks.dart
#	test/routine/routines_provider_test.mocks.dart
#	test/weight/weight_screen_test.mocks.dart
#	test/widgets/routines/gym_mode/log_page_test.mocks.dart
#	test_data/measurements.dart
2026-04-17 12:23:56 +02:00
Roland Geider
40dbe842cd Move the variation to a field in the exercise 2026-04-13 12:58:17 +02:00
John Weidner
7760efc9e3 fix: replace EOL sqlite3_flutter_libs with drift_flutter
sqlite3_flutter_libs 0.6.0+eol no longer bundles the native SQLite
library correctly on newer Android toolchains, causing a
DriftRemoteException on startup (dlopen failed: libsqlite3.so not found).

Replace it with drift_flutter which is the current recommended package
for providing native SQLite to drift databases. Also suppress the
StackFrame assertion error from the stack_trace package that was masking
the real error.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 15:56:37 -05:00
Roland Geider
3ea4713a74 Use UUIDv7, as in the backend 2026-03-21 13:41:50 +01:00
Roland Geider
c916136a8f Update measurement models
The backend now saves uses a UUID for the IDs as well, which we can now use directly
2026-03-15 15:43:29 +01:00
Roland Geider
6750859bfe Move powersync table definitions
These are now together with the "regular" drift definitions, making it
easier to spot any differences that may creep in
2026-03-14 22:32:29 +01:00
Roland Geider
997e4afa99 Add ingredient and license tables 2026-03-14 17:38:38 +01:00
Roland Geider
8ddd964302 Remove old MeasurementProvider 2026-03-14 16:35:45 +01:00
Roland Geider
7221109a64 Revert to using ID and UUID as names for the fields
This is more explicit and seems like a better way to do it.
2026-03-13 22:58:11 +01:00
Roland Geider
61e1c241f2 Update measurement tables to use powersync 2026-03-13 16:16:23 +01:00
Roland Geider
f32dec2b08 Merge branch 'master' into feature/offline-mode
# Conflicts:
#	lib/main.dart
#	lib/models/workouts/log.dart
#	lib/models/workouts/session.g.dart
#	lib/providers/exercises.dart
#	lib/providers/gym_state.g.dart
#	lib/providers/wger_base_riverpod.dart
#	lib/screens/dashboard.dart
#	lib/screens/home_tabs_screen.dart
#	lib/widgets/core/app_bar.dart
#	lib/widgets/core/settings.dart
#	lib/widgets/dashboard/calendar.dart
#	lib/widgets/dashboard/widgets/weight.dart
#	lib/widgets/routines/gym_mode/log_page.dart
#	lib/widgets/routines/gym_mode/summary.dart
#	lib/widgets/routines/logs/day_logs_container.dart
#	lib/widgets/routines/logs/exercises_expansion_card.dart
#	pubspec.lock
#	pubspec.yaml
#	test/core/settings_test.dart
#	test/core/settings_test.mocks.dart
#	test/exercises/contribute_exercise_test.mocks.dart
#	test/exercises/exercise_provider_db_test.dart
#	test/exercises/exercise_provider_test.dart
#	test/routine/gym_mode/gym_mode_test.mocks.dart
#	test/routine/routine_logs_screen_test.dart
#	test/routine/routine_logs_screen_test.mocks.dart
#	test/routine/routines_provider_test.mocks.dart
#	test/routine/routines_screen_test.mocks.dart
#	test/weight/weight_provider_test.mocks.dart
#	test/weight/weight_screen_test.mocks.dart
2026-01-19 13:16:55 +01:00
Roland Geider
4782c72934 Recreate generated files 2026-01-13 16:26:17 +01:00
Roland Geider
455c9a07b1 Merge branch 'master' into feature/powersync-test
# Conflicts:
#	lib/helpers/errors.dart
#	lib/models/workouts/log.dart
#	lib/models/workouts/session.dart
#	lib/providers/body_weight.dart
#	lib/providers/exercises.dart
#	lib/providers/gym_state.g.dart
#	lib/providers/routines.dart
#	lib/widgets/routines/forms/day.dart
#	lib/widgets/routines/forms/reps_unit.dart
#	lib/widgets/routines/forms/routine.dart
#	lib/widgets/routines/forms/session.dart
#	lib/widgets/routines/forms/slot.dart
#	lib/widgets/routines/forms/slot_entry.dart
#	lib/widgets/routines/gym_mode/log_page.dart
#	lib/widgets/routines/gym_mode/session_page.dart
#	pubspec.lock
#	test/exercises/exercise_provider_test.dart
#	test/routine/forms/session_form_test.dart
#	test/routine/gym_mode/session_page_test.dart
#	test/routine/routine_form_test.dart
2025-12-18 12:17:56 +01:00
Roland Geider
d187324a25 Properly handle null values
Basically all the fields can be nullable, so we need to set them if
we want to avoid LateInitialisation errors.
2025-12-18 10:58:40 +01:00
Roland Geider
e639709d24 Recreate generated files 2025-12-02 13:16:53 +01:00
Roland Geider
ecd0b6c6b4 Add overview page when a workout has been completed 2025-11-26 20:17:02 +01:00
Roland Geider
ae6db6ee07 Move to riverpod three
Needed to downgrade build_runner and mockito for now
2025-11-11 13:22:18 +01:00
Roland Geider
3905a91bf3 Notes is nullable on the db
It's probably a good idea to change this and simply handle empty strings
2025-11-07 14:16:13 +01:00
Roland Geider
e975eee9f2 Refactor the django powersync connector 2025-11-05 16:51:43 +01:00
Roland Geider
d1e6a04ece Remove old exercise database 2025-11-03 16:53:10 +01:00