hideChatItem method
- ChatId chatId,
 - ChatItemId id
 
override
    Implementation
@override
Future<void> hideChatItem(ChatId chatId, ChatItemId id) async {
  Log.debug('hideChatItem($chatId, $id)', '$runtimeType');
  final RxChatImpl? chat = chats[chatId];
  final Rx<ChatItem>? item = chat?.messages.firstWhereOrNull(
    (e) => e.value.id == id,
  );
  if (item != null) {
    chat?.messages.remove(item);
  }
  try {
    try {
      if (!id.isLocal) {
        await Backoff.run(
          () async {
            await _graphQlProvider.hideChatItem(id);
          },
          retryIf: (e) => e.isNetworkRelated,
          retries: 10,
        );
      }
    } on HideChatItemException catch (e) {
      switch (e.code) {
        case HideChatItemErrorCode.unknownChatItem:
          // No-op.
          break;
        case HideChatItemErrorCode.artemisUnknown:
          rethrow;
      }
    }
    if (item != null) {
      chat?.remove(item.value.id);
    }
  } catch (_) {
    if (item != null) {
      chat?.messages.insertAfter(
        item,
        (e) => item.value.at.compareTo(e.value.at) == 1,
      );
      chat?.updateReads();
    }
    rethrow;
  }
}