Skip to content

Commit

Permalink
chore: Set rollover and recover dialog to failed after timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
holzeis committed Sep 15, 2023
1 parent 9e0c11a commit 28224b1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mobile/lib/common/recover_dlc_change_notifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ class RecoverDlcChangeNotifier extends ChangeNotifier implements Subscriber {
return TaskStatusDialog(title: "Catching up!", status: status, content: content);
},
);

// setting the task status to failed after a timeout of 30 seconds.
Future.delayed(const Duration(seconds: 30), () {
taskStatus = TaskStatus.failed;
notifyListeners();
});
} else {
// notify dialog about changed task status
notifyListeners();
Expand Down
6 changes: 6 additions & 0 deletions mobile/lib/features/trade/rollover_change_notifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ class RolloverChangeNotifier extends ChangeNotifier implements Subscriber {
return TaskStatusDialog(title: "Catching up!", status: status, content: content);
},
);

// setting the task status to failed after a timeout of 30 seconds.
Future.delayed(const Duration(seconds: 30), () {
taskStatus = TaskStatus.failed;
notifyListeners();
});
} else {
// notify dialog about changed task status
notifyListeners();
Expand Down

0 comments on commit 28224b1

Please sign in to comment.