mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-25 09:13:49 +02:00
chatview: avoid to refill model for new interactions
Change-Id: I80141d22295964d1a7d3571ea2bde6b2d74faf9c Gitlab: #24 Gitlab: #57
This commit is contained in:
parent
a835a6cc9f
commit
def680ab6e
3 changed files with 8 additions and 11 deletions
|
@ -190,7 +190,6 @@ ConversationsAdapter::connectConversationModel()
|
||||||
QObject::disconnect(newConversationConnection_);
|
QObject::disconnect(newConversationConnection_);
|
||||||
QObject::disconnect(conversationRemovedConnection_);
|
QObject::disconnect(conversationRemovedConnection_);
|
||||||
QObject::disconnect(conversationClearedConnection);
|
QObject::disconnect(conversationClearedConnection);
|
||||||
QObject::disconnect(newInteractionConnection_);
|
|
||||||
QObject::disconnect(interactionRemovedConnection_);
|
QObject::disconnect(interactionRemovedConnection_);
|
||||||
QObject::disconnect(searchStatusChangedConnection_);
|
QObject::disconnect(searchStatusChangedConnection_);
|
||||||
QObject::disconnect(searchResultUpdatedConnection_);
|
QObject::disconnect(searchResultUpdatedConnection_);
|
||||||
|
@ -258,14 +257,6 @@ ConversationsAdapter::connectConversationModel()
|
||||||
backToWelcomePage();
|
backToWelcomePage();
|
||||||
});
|
});
|
||||||
|
|
||||||
newInteractionConnection_ = QObject::connect(currentConversationModel,
|
|
||||||
&lrc::api::ConversationModel::newInteraction,
|
|
||||||
[this] {
|
|
||||||
conversationSmartListModel_->fillConversationsList();
|
|
||||||
updateConversationsFilterWidget();
|
|
||||||
QMetaObject::invokeMethod(qmlObj_, "updateConversationSmartListView");
|
|
||||||
});
|
|
||||||
|
|
||||||
searchStatusChangedConnection_ = QObject::connect(currentConversationModel,
|
searchStatusChangedConnection_ = QObject::connect(currentConversationModel,
|
||||||
&lrc::api::ConversationModel::searchStatusChanged,
|
&lrc::api::ConversationModel::searchStatusChanged,
|
||||||
[this](const QString &status) {
|
[this](const QString &status) {
|
||||||
|
|
|
@ -68,7 +68,6 @@ private:
|
||||||
QMetaObject::Connection filterChangedConnection_;
|
QMetaObject::Connection filterChangedConnection_;
|
||||||
QMetaObject::Connection newConversationConnection_;
|
QMetaObject::Connection newConversationConnection_;
|
||||||
QMetaObject::Connection conversationRemovedConnection_;
|
QMetaObject::Connection conversationRemovedConnection_;
|
||||||
QMetaObject::Connection newInteractionConnection_;
|
|
||||||
QMetaObject::Connection conversationClearedConnection;
|
QMetaObject::Connection conversationClearedConnection;
|
||||||
QMetaObject::Connection selectedCallChanged_;
|
QMetaObject::Connection selectedCallChanged_;
|
||||||
QMetaObject::Connection smartlistSelectionConnection_;
|
QMetaObject::Connection smartlistSelectionConnection_;
|
||||||
|
|
|
@ -39,7 +39,14 @@ MessagesAdapter::MessagesAdapter(QObject *parent)
|
||||||
MessagesAdapter::~MessagesAdapter() {}
|
MessagesAdapter::~MessagesAdapter() {}
|
||||||
|
|
||||||
void
|
void
|
||||||
MessagesAdapter::initQmlObject() {}
|
MessagesAdapter::initQmlObject() {
|
||||||
|
connect(&LRCInstance::instance(),
|
||||||
|
&LRCInstance::currentAccountChanged,
|
||||||
|
[this](){
|
||||||
|
connectConversationModel();
|
||||||
|
});
|
||||||
|
connectConversationModel();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MessagesAdapter::setupChatView(const QString &uid)
|
MessagesAdapter::setupChatView(const QString &uid)
|
||||||
|
|
Loading…
Add table
Reference in a new issue