Add disk cache

This commit is contained in:
Christian Pauly 2020-04-10 18:00:45 +02:00
commit 1141b9a4d5
3 changed files with 19 additions and 6 deletions

View file

@ -40,7 +40,10 @@ class Avatar extends StatelessWidget {
child: CircleAvatar(
radius: size / 2,
backgroundImage: mxContent.mxc?.isNotEmpty ?? false
? AdvancedNetworkImage(src)
? AdvancedNetworkImage(
src,
useDiskCache: true,
)
: null,
backgroundColor: mxContent.mxc.isEmpty
? name?.color ?? Theme.of(context).secondaryHeaderColor