mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-17 06:15:10 +00:00
chore: Follow up user bottom sheet
This commit is contained in:
parent
3d965bf6ac
commit
b1a9c6e92d
2 changed files with 4 additions and 1 deletions
|
@ -79,6 +79,7 @@ class Avatar extends StatelessWidget {
|
|||
child: noPic
|
||||
? textWidget
|
||||
: MxcImage(
|
||||
client: client,
|
||||
key: ValueKey(mxContent.toString()),
|
||||
cacheKey: '${mxContent}_$size',
|
||||
uri: mxContent,
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue