some further work on omemo, far from done yet
This commit is contained in:
parent
6f32e99593
commit
77dd28b600
18 changed files with 161 additions and 43 deletions
|
@ -24,6 +24,9 @@ UI::Info::Info(const QString& p_jid, QWidget* parent):
|
|||
m_ui(new Ui::Info()),
|
||||
contactGeneral(nullptr),
|
||||
contactContacts(nullptr),
|
||||
#ifdef WITH_OMEMO
|
||||
omemo(nullptr),
|
||||
#endif
|
||||
description(nullptr),
|
||||
overlay(new QWidget()),
|
||||
progress(new Progress(100)),
|
||||
|
@ -57,6 +60,9 @@ void UI::Info::setData(const Shared::Info& info) {
|
|||
initializeContactGeneral(jid, card, editable);
|
||||
initializeContactContacts(jid, card, editable);
|
||||
initializeDescription(card.getDescription(), editable);
|
||||
#ifdef WITH_OMEMO
|
||||
initializeOmemo(info.getActiveKeysRef());
|
||||
#endif
|
||||
type = info.getType();
|
||||
}
|
||||
break;
|
||||
|
@ -170,5 +176,24 @@ void UI::Info::clear() {
|
|||
description->deleteLater();
|
||||
description = nullptr;
|
||||
}
|
||||
|
||||
#ifdef WITH_OMEMO
|
||||
if (omemo != nullptr) {
|
||||
omemo->deleteLater();
|
||||
omemo = nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
type = Shared::EntryType::none;
|
||||
}
|
||||
|
||||
#ifdef WITH_OMEMO
|
||||
void UI::Info::initializeOmemo(const std::list<Shared::KeyInfo>& keys) {
|
||||
if (omemo == nullptr) {
|
||||
omemo = new Omemo();
|
||||
m_ui->tabWidget->addTab(omemo, omemo->title());
|
||||
}
|
||||
omemo->setData(keys);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue