From 06de449d20f66d5c2e8fd09a875ae8bec41d4872 Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Tue, 24 Feb 2026 20:52:52 +0100 Subject: [PATCH] Add logging when tne unawaited handleUpdateExerciseFromApi This call might be causing problems when the app is sent to the background --- lib/providers/exercises.dart | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/providers/exercises.dart b/lib/providers/exercises.dart index 9d1526090..975147f8b 100644 --- a/lib/providers/exercises.dart +++ b/lib/providers/exercises.dart @@ -314,7 +314,14 @@ class ExercisesProvider with ChangeNotifier { // Note: no await since we don't care for the updated data right now. It // will be written to the db whenever the request finishes and we will get // the updated exercise the next time - handleUpdateExerciseFromApi(database, exerciseId); + handleUpdateExerciseFromApi(database, exerciseId).then( + (_) {}, + onError: (error, stackTrace) => _logger.info( + 'Error while calling unawaited handleUpdateExerciseFromApi', + error, + stackTrace, + ), + ); return exercise; } on NoSuchEntryException {