favoriteChat method

Future<void> favoriteChat()

Marks a Chat-dialog with the user as favorite.

Implementation

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