chore: Follow up flickering avatars
This commit is contained in:
parent
e7ab79b87e
commit
a1bf8d9f90
1 changed files with 2 additions and 0 deletions
|
|
@ -130,6 +130,7 @@ class _MxcImageState extends State<MxcImage> {
|
|||
}
|
||||
|
||||
void _tryLoad(_) async {
|
||||
if (_imageData != null) return;
|
||||
try {
|
||||
await _load();
|
||||
} catch (_) {
|
||||
|
|
@ -169,6 +170,7 @@ class _MxcImageState extends State<MxcImage> {
|
|||
fit: widget.fit,
|
||||
errorBuilder: (context, __, ___) {
|
||||
_isCached = false;
|
||||
_imageData = null;
|
||||
WidgetsBinding.instance.addPostFrameCallback(_tryLoad);
|
||||
return placeholder(context);
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue