mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-01-11 18:22:49 +01:00
fix: Navigator context
This commit is contained in:
parent
efcf94edd7
commit
1e5393a9e1
@ -483,7 +483,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)/Flutter",
|
"$(PROJECT_DIR)/Flutter",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 0.30.3;
|
MARKETING_VERSION = 0.31.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = im.fluffychat.app;
|
PRODUCT_BUNDLE_IDENTIFIER = im.fluffychat.app;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
@ -623,7 +623,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)/Flutter",
|
"$(PROJECT_DIR)/Flutter",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 0.30.3;
|
MARKETING_VERSION = 0.31.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = im.fluffychat.app;
|
PRODUCT_BUNDLE_IDENTIFIER = im.fluffychat.app;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
@ -657,7 +657,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)/Flutter",
|
"$(PROJECT_DIR)/Flutter",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 0.30.3;
|
MARKETING_VERSION = 0.31.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = im.fluffychat.app;
|
PRODUCT_BUNDLE_IDENTIFIER = im.fluffychat.app;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
@ -687,7 +687,7 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 0.30.3;
|
MARKETING_VERSION = 0.31.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "im.fluffychat.app.FluffyChat-Share";
|
PRODUCT_BUNDLE_IDENTIFIER = "im.fluffychat.app.FluffyChat-Share";
|
||||||
@ -721,7 +721,7 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 0.30.3;
|
MARKETING_VERSION = 0.31.0;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "im.fluffychat.app.FluffyChat-Share";
|
PRODUCT_BUNDLE_IDENTIFIER = "im.fluffychat.app.FluffyChat-Share";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
@ -752,7 +752,7 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 0.30.3;
|
MARKETING_VERSION = 0.31.0;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "im.fluffychat.app.FluffyChat-Share";
|
PRODUCT_BUNDLE_IDENTIFIER = "im.fluffychat.app.FluffyChat-Share";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
@ -5,12 +5,13 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
|
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
|
||||||
import 'matrix_file_extension.dart';
|
import 'matrix_file_extension.dart';
|
||||||
import '../../pages/image_viewer.dart';
|
import '../../pages/image_viewer.dart';
|
||||||
|
import '../../widgets/matrix.dart';
|
||||||
|
|
||||||
extension LocalizedBody on Event {
|
extension LocalizedBody on Event {
|
||||||
void openFile(BuildContext context, {bool downloadOnly = false}) async {
|
void openFile(BuildContext context, {bool downloadOnly = false}) async {
|
||||||
if (!downloadOnly &&
|
if (!downloadOnly &&
|
||||||
[MessageTypes.Image, MessageTypes.Sticker].contains(messageType)) {
|
[MessageTypes.Image, MessageTypes.Sticker].contains(messageType)) {
|
||||||
await Navigator.of(context, rootNavigator: true).push(
|
await Navigator.of(Matrix.of(context).navigatorContext).push(
|
||||||
MaterialPageRoute(builder: (_) => ImageViewer(this)),
|
MaterialPageRoute(builder: (_) => ImageViewer(this)),
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
|
@ -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;
|
||||||
@ -237,7 +238,7 @@ class _ImageBubbleState extends State<ImageBubble> {
|
|||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (!widget.tapToView) return;
|
if (!widget.tapToView) return;
|
||||||
Navigator.of(context, rootNavigator: true).push(
|
Navigator.of(Matrix.of(context).navigatorContext).push(
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
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.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
name: fluffychat
|
name: fluffychat
|
||||||
description: Chat with your friends.
|
description: Chat with your friends.
|
||||||
publish_to: none
|
publish_to: none
|
||||||
version: 0.31.0+0
|
version: 0.31.1+0
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.6.0 <3.0.0"
|
sdk: ">=2.6.0 <3.0.0"
|
||||||
|
Loading…
Reference in New Issue
Block a user