mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-19 04:15:09 +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
|
child: noPic
|
||||||
? textWidget
|
? textWidget
|
||||||
: MxcImage(
|
: MxcImage(
|
||||||
|
client: client,
|
||||||
key: ValueKey(mxContent.toString()),
|
key: ValueKey(mxContent.toString()),
|
||||||
cacheKey: '${mxContent}_$size',
|
cacheKey: '${mxContent}_$size',
|
||||||
uri: mxContent,
|
uri: mxContent,
|
||||||
|
|
|
@ -23,6 +23,7 @@ class MxcImage extends StatefulWidget {
|
||||||
final ThumbnailMethod thumbnailMethod;
|
final ThumbnailMethod thumbnailMethod;
|
||||||
final Widget Function(BuildContext context)? placeholder;
|
final Widget Function(BuildContext context)? placeholder;
|
||||||
final String? cacheKey;
|
final String? cacheKey;
|
||||||
|
final Client? client;
|
||||||
|
|
||||||
const MxcImage({
|
const MxcImage({
|
||||||
this.uri,
|
this.uri,
|
||||||
|
@ -38,6 +39,7 @@ class MxcImage extends StatefulWidget {
|
||||||
this.animationCurve = FluffyThemes.animationCurve,
|
this.animationCurve = FluffyThemes.animationCurve,
|
||||||
this.thumbnailMethod = ThumbnailMethod.scale,
|
this.thumbnailMethod = ThumbnailMethod.scale,
|
||||||
this.cacheKey,
|
this.cacheKey,
|
||||||
|
this.client,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -64,7 +66,7 @@ class _MxcImageState extends State<MxcImage> {
|
||||||
bool? _isCached;
|
bool? _isCached;
|
||||||
|
|
||||||
Future<void> _load() async {
|
Future<void> _load() async {
|
||||||
final client = Matrix.of(context).client;
|
final client = widget.client ?? Matrix.of(context).client;
|
||||||
final uri = widget.uri;
|
final uri = widget.uri;
|
||||||
final event = widget.event;
|
final event = widget.event;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue