mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-01-23 18:44:10 +01:00
chore: Follow up flickering avatars
This commit is contained in:
parent
88d7f58574
commit
6912d9c5ee
@ -130,6 +130,7 @@ class _MxcImageState extends State<MxcImage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _tryLoad(_) async {
|
void _tryLoad(_) async {
|
||||||
|
if (_imageData != null) return;
|
||||||
try {
|
try {
|
||||||
await _load();
|
await _load();
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
@ -169,6 +170,7 @@ class _MxcImageState extends State<MxcImage> {
|
|||||||
fit: widget.fit,
|
fit: widget.fit,
|
||||||
errorBuilder: (context, __, ___) {
|
errorBuilder: (context, __, ___) {
|
||||||
_isCached = false;
|
_isCached = false;
|
||||||
|
_imageData = null;
|
||||||
WidgetsBinding.instance.addPostFrameCallback(_tryLoad);
|
WidgetsBinding.instance.addPostFrameCallback(_tryLoad);
|
||||||
return placeholder(context);
|
return placeholder(context);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user