From bf36bf60013b4922d1263e92bc828349c21c7f3f Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Thu, 9 Apr 2020 09:51:52 +0200 Subject: [PATCH] Minor fixes --- CHANGELOG.md | 2 ++ android/app/src/main/AndroidManifest.xml | 2 +- lib/components/matrix.dart | 11 ++++++- lib/views/chat.dart | 2 +- lib/views/chat_list.dart | 9 ++++-- pubspec.lock | 37 ++++++++++++++---------- 6 files changed, 43 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21c8122..28c9f92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,10 @@ # Version 0.12.0 - 2020-04-?? ### Features: - Implement custom wallpapers +- Use SKIA for web ### Fixes: - Fix image scaling +- Minor bugfixes # Version 0.11.0 - 2020-04-02 ### Features: diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 738f638..b27e14d 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -16,7 +16,7 @@ android:icon="@mipmap/launcher_icon"> { FirebaseMessaging _firebaseMessaging = FirebaseMessaging(); FlutterLocalNotificationsPlugin _flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin(); - Map shareContent; + Map get shareContent => _shareContent; + set shareContent(Map content) { + _shareContent = content; + onShareContentChanged.add(_shareContent); + } + + Map _shareContent; + + final StreamController> onShareContentChanged = + StreamController.broadcast(); String activeRoomId; File wallpaper; diff --git a/lib/views/chat.dart b/lib/views/chat.dart index c075db2..ae7decc 100644 --- a/lib/views/chat.dart +++ b/lib/views/chat.dart @@ -373,7 +373,7 @@ class _ChatState extends State<_Chat> { title: selectedEvents.isEmpty ? Column( mainAxisSize: MainAxisSize.min, - crossAxisAlignment: Platform.isIOS + crossAxisAlignment: !kIsWeb && Platform.isIOS ? CrossAxisAlignment.center : CrossAxisAlignment.start, children: [ diff --git a/lib/views/chat_list.dart b/lib/views/chat_list.dart index 48156ee..bc55024 100644 --- a/lib/views/chat_list.dart +++ b/lib/views/chat_list.dart @@ -125,7 +125,6 @@ class _ChatListState extends State { path: file.path, ), }; - setState(() => null); } void _processIncomingSharedText(String text) { @@ -141,7 +140,6 @@ class _ChatListState extends State { "msgtype": "m.text", "body": text, }; - setState(() => null); } void _initReceiveSharingINtent() { @@ -170,11 +168,18 @@ class _ChatListState extends State { ); _intentDataStreamSubscription?.cancel(); _intentFileStreamSubscription?.cancel(); + _onShareContentChangedSub?.cancel(); super.dispose(); } + StreamSubscription _onShareContentChangedSub; + @override Widget build(BuildContext context) { + _onShareContentChangedSub ??= Matrix.of(context) + .onShareContentChanged + .stream + .listen((c) => setState(() => null)); if (Matrix.of(context).shareContent != null) { selectMode = SelectMode.share; } else if (selectMode == SelectMode.share) { diff --git a/pubspec.lock b/pubspec.lock index 22b82f6..6f30b4b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -21,28 +21,28 @@ packages: name: archive url: "https://pub.dartlang.org" source: hosted - version: "2.0.11" + version: "2.0.13" args: dependency: transitive description: name: args url: "https://pub.dartlang.org" source: hosted - version: "1.5.2" + version: "1.6.0" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.4.0" + version: "2.4.1" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "2.0.0" bubble: dependency: "direct main" description: @@ -63,14 +63,14 @@ packages: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" + version: "1.1.3" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.14.11" + version: "1.14.12" convert: dependency: transitive description: @@ -91,7 +91,7 @@ packages: name: crypto url: "https://pub.dartlang.org" source: hosted - version: "2.1.3" + version: "2.1.4" csslib: dependency: transitive description: @@ -260,7 +260,7 @@ packages: name: image url: "https://pub.dartlang.org" source: hosted - version: "2.1.4" + version: "2.1.12" image_picker: dependency: "direct main" description: @@ -274,7 +274,7 @@ packages: name: intl url: "https://pub.dartlang.org" source: hosted - version: "0.16.0" + version: "0.16.1" intl_translation: dependency: "direct main" description: @@ -502,7 +502,7 @@ packages: name: quiver url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.1.3" receive_sharing_intent: dependency: "direct main" description: @@ -570,7 +570,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.5.5" + version: "1.7.0" sqflite: dependency: "direct main" description: @@ -619,21 +619,21 @@ packages: name: test url: "https://pub.dartlang.org" source: hosted - version: "1.9.4" + version: "1.13.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.11" + version: "0.2.15" test_core: dependency: transitive description: name: test_core url: "https://pub.dartlang.org" source: hosted - version: "0.2.15" + version: "0.3.1" typed_data: dependency: transitive description: @@ -718,6 +718,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.0" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + url: "https://pub.dartlang.org" + source: hosted + version: "0.5.0+1" webview_flutter: dependency: "direct main" description: @@ -731,7 +738,7 @@ packages: name: xml url: "https://pub.dartlang.org" source: hosted - version: "3.5.0" + version: "3.6.1" yaml: dependency: transitive description: