From 1a83d33cf54204be51b73403d638bf754a580596 Mon Sep 17 00:00:00 2001 From: Krille Date: Wed, 29 Nov 2023 13:39:55 +0100 Subject: [PATCH] build: Update Matrix Dart SDK to 0.24.0 --- lib/utils/room_status_extension.dart | 29 ---------------------------- pubspec.lock | 4 ++-- pubspec.yaml | 2 +- 3 files changed, 3 insertions(+), 32 deletions(-) diff --git a/lib/utils/room_status_extension.dart b/lib/utils/room_status_extension.dart index 3b4e623f7..02c70b088 100644 --- a/lib/utils/room_status_extension.dart +++ b/lib/utils/room_status_extension.dart @@ -4,37 +4,8 @@ import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:matrix/matrix.dart'; import '../config/app_config.dart'; -import 'date_time_extension.dart'; extension RoomStatusExtension on Room { - CachedPresence? get directChatPresence => - client.presences[directChatMatrixID]; - - String getLocalizedStatus(BuildContext context) { - if (isDirectChat) { - final directChatPresence = this.directChatPresence; - if (directChatPresence != null && - (directChatPresence.lastActiveTimestamp != null || - directChatPresence.currentlyActive != null)) { - if (directChatPresence.statusMsg?.isNotEmpty ?? false) { - return directChatPresence.statusMsg!; - } - if (directChatPresence.currentlyActive == true) { - return L10n.of(context)!.currentlyActive; - } - if (directChatPresence.lastActiveTimestamp == null) { - return L10n.of(context)!.lastSeenLongTimeAgo; - } - final time = directChatPresence.lastActiveTimestamp!; - return L10n.of(context)! - .lastActiveAgo(time.localizedTimeShort(context)); - } - return L10n.of(context)!.lastSeenLongTimeAgo; - } - return L10n.of(context)! - .countParticipants(summary.mJoinedMemberCount.toString()); - } - String getLocalizedTypingText(BuildContext context) { var typingText = ''; final typingUsers = this.typingUsers; diff --git a/pubspec.lock b/pubspec.lock index 896e4f0eb..2dc9194f6 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1153,10 +1153,10 @@ packages: dependency: "direct main" description: name: matrix - sha256: "4c94857b53674067b7aeb39723220ee7834128ffde3d54f8185c73a6784bc919" + sha256: "155673171920dceb224bd209f51a3e41fc5c015f55ec780c9d95e54eb84ba582" url: "https://pub.dev" source: hosted - version: "0.23.0" + version: "0.24.0" matrix_api_lite: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index d47744f2e..0fb97890a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -61,7 +61,7 @@ dependencies: keyboard_shortcuts: ^0.1.4 latlong2: ^0.8.1 linkify: ^5.0.0 - matrix: ^0.23.0 + matrix: ^0.24.0 matrix_homeserver_recommendations: ^0.3.0 native_imaging: ^0.1.0 package_info_plus: ^4.0.0