From 9f396a78458bfd8a44d04b5924759156f9dccb6a Mon Sep 17 00:00:00 2001 From: Boris Pek Date: Mon, 27 May 2024 23:38:28 +0300 Subject: [PATCH] Current version of Psi+ is 1.5.1934 It is based on: * psi: 2ef66ea0 * plugins: 7a65467 * psimedia: 478567e * resources: e32ef4b --- src/infodlg.cpp | 12 ++++++++++++ src/vcardfactory.cpp | 7 ++++++- version | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/infodlg.cpp b/src/infodlg.cpp index 8c1dc6e61..a722a2fe6 100644 --- a/src/infodlg.cpp +++ b/src/infodlg.cpp @@ -320,6 +320,18 @@ InfoWidget::InfoWidget(int type, const Jid &j, const VCard &vcard, PsiAccount *p connect(d->pa->client(), SIGNAL(resourceUnavailable(const Jid &, const Resource &)), SLOT(contactUnavailable(const Jid &, const Resource &))); connect(d->pa, SIGNAL(updateContact(const Jid &)), SLOT(contactUpdated(const Jid &))); + connect(VCardFactory::instance(), &VCardFactory::vcardChanged, this, + [this](const Jid &j, VCardFactory::Flags flags) { + if (d->jid.compare(j, flags & VCardFactory::MucUser)) { + auto vcard = (flags & VCardFactory::MucUser) ? VCardFactory::instance()->mucVcard(j) + : VCardFactory::instance()->vcard(j); + if (vcard) { + d->vcard = vcard; + setData(d->vcard); + } + updateNick(); + } + }); m_ui.te_status->setReadOnly(true); m_ui.te_status->setAcceptRichText(true); PsiRichText::install(m_ui.te_status->document()); diff --git a/src/vcardfactory.cpp b/src/vcardfactory.cpp index b0d548a06..22938ac22 100644 --- a/src/vcardfactory.cpp +++ b/src/vcardfactory.cpp @@ -35,6 +35,8 @@ #include #include +// #define VCF_DEBUG 1 + using VCardRequestQueue = QList; class VCardFactory::QueuedLoader : public QObject { @@ -84,9 +86,12 @@ VCardFactory::VCardFactory() : QObject(qApp), dictSize_(5), queuedLoader_(new Qu } else { saveVCard(request->jid(), request->vcard(), request->flags()); } - } else { + } +#ifdef VCF_DEBUG + else { qDebug() << "vcard query failed for " << request->jid().full() << ": " << request->errorString(); } +#endif }); } diff --git a/version b/version index 43c7b2add..74ae703bd 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.5.1933 (2024-05-27, ad9d69af) +1.5.1934 (2024-05-27, 2ef66ea0)