mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-20 02:59:26 +01:00
fix: Correct context for Image Bubble
This commit is contained in:
parent
b85270b58a
commit
afa1003e44
@ -7,6 +7,7 @@ import 'package:cached_network_image/cached_network_image.dart';
|
|||||||
import 'package:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
|
||||||
import '../../utils/matrix_sdk_extensions.dart/event_extension.dart';
|
import '../../utils/matrix_sdk_extensions.dart/event_extension.dart';
|
||||||
|
import '../matrix.dart';
|
||||||
|
|
||||||
class ImageBubble extends StatefulWidget {
|
class ImageBubble extends StatefulWidget {
|
||||||
final Event event;
|
final Event event;
|
||||||
@ -238,7 +239,7 @@ class _ImageBubbleState extends State<ImageBubble> {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
if (!widget.tapToView) return;
|
if (!widget.tapToView) return;
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: Matrix.of(context).navigatorContext,
|
||||||
builder: (_) => ImageViewer(widget.event, onLoaded: () {
|
builder: (_) => ImageViewer(widget.event, onLoaded: () {
|
||||||
// If the original file didn't load yet, we want to do that now.
|
// If the original file didn't load yet, we want to do that now.
|
||||||
// This is so that the original file displays after going on the image viewer,
|
// This is so that the original file displays after going on the image viewer,
|
||||||
|
Loading…
Reference in New Issue
Block a user