diff --git a/lib/pages/chat.dart b/lib/pages/chat.dart index 56ff886a7..8912718cd 100644 --- a/lib/pages/chat.dart +++ b/lib/pages/chat.dart @@ -168,7 +168,7 @@ class ChatController extends State { timeline = await room.getTimeline(onUpdate: updateView); if (timeline.events.isNotEmpty) { // ignore: unawaited_futures - room.setUnread(false).catchError((err) { + room.markUnread(false).catchError((err) { if (err is MatrixException && err.errcode == 'M_FORBIDDEN') { // ignore if the user is not in the room (still joining) return; @@ -197,10 +197,7 @@ class ChatController extends State { timeline.events.isNotEmpty && Matrix.of(context).webHasFocus) { // ignore: unawaited_futures - room.setReadMarker( - timeline.events.first.eventId, - mRead: timeline.events.first.eventId, - ); + timeline.setReadMarker(); if (PlatformInfos.isIOS) { // Workaround for iOS not clearing notifications with fcm_shared_isolate if (!room.client.rooms.any((r) => diff --git a/lib/pages/chat_list.dart b/lib/pages/chat_list.dart index 580973d1d..7ad260fd6 100644 --- a/lib/pages/chat_list.dart +++ b/lib/pages/chat_list.dart @@ -235,7 +235,7 @@ class ChatListController extends State { final room = Matrix.of(context).client.getRoomById(selectedRoomIds.single); return showFutureLoadingDialog( context: context, - future: () => room.setUnread(!room.isUnread), + future: () => room.markUnread(!room.isUnread), ); } diff --git a/lib/pages/views/chat_list_view.dart b/lib/pages/views/chat_list_view.dart index 79aac6559..f0600616e 100644 --- a/lib/pages/views/chat_list_view.dart +++ b/lib/pages/views/chat_list_view.dart @@ -432,7 +432,7 @@ class _ChatListViewBody extends StatelessWidget { return FutureBuilder( future: controller.waitForFirstSync(), builder: (BuildContext context, snapshot) { - if (Matrix.of(context).client.prevBatch != null) { + if (snapshot.connectionState == ConnectionState.done) { final rooms = Matrix.of(context) .client .rooms diff --git a/lib/utils/client_manager.dart b/lib/utils/client_manager.dart index 80575ff9c..097fe30a5 100644 --- a/lib/utils/client_manager.dart +++ b/lib/utils/client_manager.dart @@ -39,7 +39,7 @@ abstract class ClientManager { await Future.wait(clients.map((client) => client .init( waitForFirstSync: false, - waitUntilFullLoaded: false, + waitUntilLoadCompletedLoaded: false, ) .catchError((e, s) => Logs().e('Unable to initialize client', e, s)))); if (clients.length > 1 && clients.any((c) => !c.isLogged())) { diff --git a/pubspec.lock b/pubspec.lock index 8acbc6d22..2b54f42e4 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -752,12 +752,10 @@ packages: matrix: dependency: "direct main" description: - path: "." - ref: "krille/improve-start-up-time" - resolved-ref: "6585cf195f414175c72693f720569d9ce68319d2" - url: "https://gitlab.com/famedly/company/frontend/famedlysdk.git" - source: git - version: "0.7.0-nullsafety.3" + name: matrix + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.0-nullsafety.4" matrix_api_lite: dependency: "direct overridden" description: diff --git a/pubspec.yaml b/pubspec.yaml index d60028697..23096b2f0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -45,7 +45,7 @@ dependencies: intl: any localstorage: ^4.0.0+1 lottie: ^1.2.1 - matrix: ^0.7.0-nullsafety.3 + matrix: ^0.7.0-nullsafety.4 matrix_link_text: ^1.0.2 native_imaging: git: https://gitlab.com/famedly/libraries/native_imaging.git @@ -112,9 +112,5 @@ dependency_overrides: hosted: name: geolocator_android url: https://hanntech-gmbh.gitlab.io/free2pass/flutter-geolocator-floss - matrix: - git: - url: https://gitlab.com/famedly/company/frontend/famedlysdk.git - ref: krille/improve-start-up-time matrix_api_lite: ^0.5.0 provider: 5.0.0 \ No newline at end of file