chore: Follow up user bottom sheet

This commit is contained in:
krille-chan 2024-07-26 19:36:07 +02:00
parent 3d965bf6ac
commit b1a9c6e92d
No known key found for this signature in database
2 changed files with 4 additions and 1 deletions

View file

@ -79,6 +79,7 @@ class Avatar extends StatelessWidget {
child: noPic
? textWidget
: MxcImage(
client: client,
key: ValueKey(mxContent.toString()),
cacheKey: '${mxContent}_$size',
uri: mxContent,

View file

@ -23,6 +23,7 @@ class MxcImage extends StatefulWidget {
final ThumbnailMethod thumbnailMethod;
final Widget Function(BuildContext context)? placeholder;
final String? cacheKey;
final Client? client;
const MxcImage({
this.uri,
@ -38,6 +39,7 @@ class MxcImage extends StatefulWidget {
this.animationCurve = FluffyThemes.animationCurve,
this.thumbnailMethod = ThumbnailMethod.scale,
this.cacheKey,
this.client,
super.key,
});
@ -64,7 +66,7 @@ class _MxcImageState extends State<MxcImage> {
bool? _isCached;
Future<void> _load() async {
final client = Matrix.of(context).client;
final client = widget.client ?? Matrix.of(context).client;
final uri = widget.uri;
final event = widget.event;