Commit 9c073f63 authored by Ming Rui Zhang's avatar Ming Rui Zhang

accountadapter: respond to profileUpdated signals

Gitlab: #297

Change-Id: Iaff41075edc683bd976ff69cfd8f7a80547771cc
parent 5b33a1df
......@@ -355,6 +355,7 @@ AccountAdapter::connectAccount(const QString& accountId)
auto& accInfo = LRCInstance::accountModel().getAccountInfo(accountId);
QObject::disconnect(accountStatusChangedConnection_);
QObject::disconnect(accountProfileUpdatedConnection_);
QObject::disconnect(contactAddedConnection_);
QObject::disconnect(addedToConferenceConnection_);
QObject::disconnect(contactUnbannedConnection_);
......@@ -366,6 +367,13 @@ AccountAdapter::connectAccount(const QString& accountId)
emit accountStatusChanged(accountId);
});
accountProfileUpdatedConnection_
= QObject::connect(accInfo.accountModel,
&lrc::api::NewAccountModel::profileUpdated,
[this](const QString& accountId) {
emit accountStatusChanged(accountId);
});
contactAddedConnection_
= QObject::connect(accInfo.contactModel.get(),
&lrc::api::ContactModel::contactAdded,
......
/*
/*
* Copyright (C) 2020 by Savoir-faire Linux
* Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
*
......@@ -143,6 +143,7 @@ private:
void connectFailure();
QMetaObject::Connection accountStatusChangedConnection_;
QMetaObject::Connection accountProfileUpdatedConnection_;
QMetaObject::Connection contactAddedConnection_;
QMetaObject::Connection addedToConferenceConnection_;
QMetaObject::Connection contactUnbannedConnection_;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment