chore: Follow up flickering avatars

This commit is contained in:
Christian Pauly 2022-07-30 10:32:03 +02:00
parent 88d7f58574
commit 6912d9c5ee

View File

@ -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);
},