add mounted check

This commit is contained in:
Fabian Freund
2025-12-30 06:56:08 +01:00
parent cc8984ca1b
commit 62f53ce327
2 changed files with 2 additions and 2 deletions
@@ -226,7 +226,7 @@ class MlDownloadState extends _$MlDownloadState {
if (progress.status == MlProgressStatus.done) {
// Keep showing for 2 seconds after completion
Future.delayed(const Duration(seconds: 2), () {
if (state != null && state!.id == progress.id) {
if (ref.mounted && state != null && state!.id == progress.id) {
state = null;
}
});