hideChatItem method

Future<void> hideChatItem(
  1. ChatItem item
)

Hides the specified ChatItem for the authenticated MyUser.

Implementation

Future<void> hideChatItem(ChatItem item) async {
  try {
    await _chatService.hideChatItem(item);
  } on HideChatItemException catch (e) {
    switch (e.code) {
      case HideChatItemErrorCode.unknownChatItem:
        // No-op.
        break;

      case HideChatItemErrorCode.artemisUnknown:
        MessagePopup.error('err_unknown'.l10n);
    }
  } on UnfavoriteChatException catch (e) {
    MessagePopup.error(e);
  } catch (e) {
    MessagePopup.error(e);
    rethrow;
  }
}