Fix web avatars

This commit is contained in:
Christian Pauly 2020-05-15 21:50:44 +02:00
commit 158e09910a
4 changed files with 37 additions and 32 deletions

View file

@ -42,12 +42,10 @@ class Avatar extends StatelessWidget {
child: CircleAvatar(
radius: size / 2,
backgroundImage: !noPic
? kIsWeb
? NetworkImage(src)
: AdvancedNetworkImage(
src,
useDiskCache: true,
)
? AdvancedNetworkImage(
src,
useDiskCache: !kIsWeb,
)
: null,
backgroundColor: noPic
? name?.color ?? Theme.of(context).secondaryHeaderColor