unfavoriteChat method

Future<void> unfavoriteChat()

Removes a Chat-dialog with the user from the favorites.

Implementation

Future<void> unfavoriteChat() async {
  final ChatId? dialog = user?.user.value.dialog;
  try {
    if (dialog != null) {
      await _chatService.unfavoriteChat(dialog);
    }
  } on UnfavoriteChatContactException catch (e) {
    MessagePopup.error(e.toMessage());
  } catch (e) {
    MessagePopup.error('err_data_transfer'.l10n);
    rethrow;
  }
}