diff --git a/lib/src/timeline.dart b/lib/src/timeline.dart index f465e718..c592620f 100644 --- a/lib/src/timeline.dart +++ b/lib/src/timeline.dart @@ -363,7 +363,7 @@ class Timeline { } /// Set the read marker to the last synced event in this timeline. - Future setReadMarker(String? eventId, {bool? public}) async { + Future setReadMarker({String? eventId, bool? public}) async { eventId ??= events.firstWhereOrNull((event) => event.status.isSynced)?.eventId; if (eventId == null) return; diff --git a/test/timeline_context_test.dart b/test/timeline_context_test.dart index cb4d574b..f62b45c8 100644 --- a/test/timeline_context_test.dart +++ b/test/timeline_context_test.dart @@ -480,7 +480,7 @@ void main() { await waitForCount(7); room.notificationCount = 1; - await timeline.setReadMarker(null); + await timeline.setReadMarker(); //expect(room.notificationCount, 0); }); test('sending an event and the http request finishes first, 0 -> 1 -> 2', diff --git a/test/timeline_test.dart b/test/timeline_test.dart index 543d77e6..97f73897 100644 --- a/test/timeline_test.dart +++ b/test/timeline_test.dart @@ -706,7 +706,7 @@ void main() { )); await Future.delayed(Duration(milliseconds: 50)); room.notificationCount = 1; - await timeline.setReadMarker(null); + await timeline.setReadMarker(); //expect(room.notificationCount, 0); }); test('sending an event and the http request finishes first, 0 -> 1 -> 2',