mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
Only sort the routine list once
This commit is contained in:
@@ -152,9 +152,9 @@ class WorkoutPlansProvider extends WgerBaseProvider with ChangeNotifier {
|
||||
for (final workoutPlanData in data['results']) {
|
||||
final plan = WorkoutPlan.fromJson(workoutPlanData);
|
||||
_workoutPlans.add(plan);
|
||||
_workoutPlans.sort((a, b) => b.creationDate.compareTo(a.creationDate));
|
||||
}
|
||||
|
||||
_workoutPlans.sort((a, b) => b.creationDate.compareTo(a.creationDate));
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user