From 6912d9c5ee456eb7a82618c9db8fd90137c1836c Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Sat, 30 Jul 2022 10:32:03 +0200 Subject: [PATCH] chore: Follow up flickering avatars --- lib/widgets/mxc_image.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/widgets/mxc_image.dart b/lib/widgets/mxc_image.dart index 98404140..bce159c6 100644 --- a/lib/widgets/mxc_image.dart +++ b/lib/widgets/mxc_image.dart @@ -130,6 +130,7 @@ class _MxcImageState extends State { } void _tryLoad(_) async { + if (_imageData != null) return; try { await _load(); } catch (_) { @@ -169,6 +170,7 @@ class _MxcImageState extends State { fit: widget.fit, errorBuilder: (context, __, ___) { _isCached = false; + _imageData = null; WidgetsBinding.instance.addPostFrameCallback(_tryLoad); return placeholder(context); },