fix: ImageViewer again

onboarding
Christian Pauly 4 years ago
parent db39fa8f92
commit 2369da14b3

@ -99,8 +99,13 @@ class ChatController extends State<Chat> {
try { try {
await timeline.requestHistory(historyCount: _loadHistoryCount); await timeline.requestHistory(historyCount: _loadHistoryCount);
} catch (err) { } catch (err) {
ScaffoldMessenger.of(context).showSnackBar(SnackBar( ScaffoldMessenger.of(context).showSnackBar(
content: Text((err as Object).toLocalizedString(context)))); SnackBar(
content: Text(
(err as Object).toLocalizedString(context),
),
),
);
} }
} }
} }

@ -240,6 +240,7 @@ class _ImageBubbleState extends State<ImageBubble> {
if (!widget.tapToView) return; if (!widget.tapToView) return;
showDialog( showDialog(
context: Matrix.of(context).navigatorContext, context: Matrix.of(context).navigatorContext,
useRootNavigator: false,
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…
Cancel
Save