Prepare secure config and reliable workout sync
This commit is contained in:
@@ -97,14 +97,7 @@ class WorkoutController extends GetxController {
|
||||
workout.endLng = workout.coordinates.last.longitude;
|
||||
}
|
||||
|
||||
// حفظ في قاعدة البيانات المحلية
|
||||
await _db.saveWorkout(workout);
|
||||
await _db.saveSegments(workout.id, workout.segments);
|
||||
|
||||
// مسح الإحداثيات المؤقتة من جدول الـ GPS (لأنها حفظت في الـ Polyline)
|
||||
// أو يمكن تركها إذا أردت دقة عالية جداً لاحقاً
|
||||
|
||||
// إضافة إلى طابور المزامنة
|
||||
// Save the workout and its outbox record in one local transaction.
|
||||
await _sync.queueWorkout(workout);
|
||||
|
||||
currentWorkout.value = null;
|
||||
|
||||
Reference in New Issue
Block a user