refactor: Controllers

This commit is contained in:
Christian Pauly 2021-04-10 09:06:24 +02:00
commit 0bc97264ac
5 changed files with 57 additions and 33 deletions

View file

@ -1,5 +1,5 @@
import 'package:famedlysdk/famedlysdk.dart';
import 'package:fluffychat/views/image_view.dart';
import 'package:fluffychat/controllers/image_viewer_controller.dart';
import 'package:flutter/material.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_blurhash/flutter_blurhash.dart';
@ -235,7 +235,7 @@ class _ImageBubbleState extends State<ImageBubble> {
if (!widget.tapToView) return;
Navigator.of(context, rootNavigator: false).push(
MaterialPageRoute(
builder: (_) => ImageView(widget.event, onLoaded: () {
builder: (_) => ImageViewer(widget.event, onLoaded: () {
// 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,
// waiting for it to load, and then hitting back. This ensures that we always