readUntil method

Future<void> readUntil(
  1. ChatId chatId,
  2. ChatItemId untilId
)

Marks the specified Chat as read until the provided ChatItemId for the authenticated MyUser.

Implementation

Future<void> readUntil(ChatId chatId, ChatItemId untilId) async {
  Log.debug('readUntil($chatId, $untilId)', '$runtimeType');

  await Backoff.run(
    () async {
      await _graphQlProvider.readChat(chatId, untilId);
    },
    retryIf: (e) => e.isNetworkRelated,
    retries: 10,
  );
}