Skip to content

Commit

Permalink
fix: Only try again load mxc image on io exception
Browse files Browse the repository at this point in the history
  • Loading branch information
krille-chan committed Jan 1, 2025
1 parent bb5d865 commit f301d5e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/widgets/mxc_image.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'dart:io';
import 'dart:typed_data';

import 'package:flutter/material.dart';
Expand Down Expand Up @@ -110,7 +111,7 @@ class _MxcImageState extends State<MxcImage> {
}
try {
await _load();
} catch (_) {
} on IOException catch (_) {
if (!mounted) return;
await Future.delayed(widget.retryDuration);
_tryLoad(_);
Expand Down

0 comments on commit f301d5e

Please sign in to comment.