fix: Only try again load mxc image on io exception
This commit is contained in:
parent
bb5d865b46
commit
f301d5edd1
1 changed files with 2 additions and 1 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import 'dart:io';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
|
@ -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(_);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue