mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-07-13 03:55:23 +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(conversationRemovedConnection_);
|
||||
QObject::disconnect(conversationClearedConnection);
|
||||
QObject::disconnect(newInteractionConnection_);
|
||||
QObject::disconnect(interactionRemovedConnection_);
|
||||
QObject::disconnect(searchStatusChangedConnection_);
|
||||
QObject::disconnect(searchResultUpdatedConnection_);
|
||||
|
@ -258,14 +257,6 @@ ConversationsAdapter::connectConversationModel()
|
|||
backToWelcomePage();
|
||||
});
|
||||
|
||||
newInteractionConnection_ = QObject::connect(currentConversationModel,
|
||||
&lrc::api::ConversationModel::newInteraction,
|
||||
[this] {
|
||||
conversationSmartListModel_->fillConversationsList();
|
||||
updateConversationsFilterWidget();
|
||||
QMetaObject::invokeMethod(qmlObj_, "updateConversationSmartListView");
|
||||
});
|
||||
|
||||
searchStatusChangedConnection_ = QObject::connect(currentConversationModel,
|
||||
&lrc::api::ConversationModel::searchStatusChanged,
|
||||
[this](const QString &status) {
|
||||
|
|
|
@ -68,7 +68,6 @@ private:
|
|||
QMetaObject::Connection filterChangedConnection_;
|
||||
QMetaObject::Connection newConversationConnection_;
|
||||
QMetaObject::Connection conversationRemovedConnection_;
|
||||
QMetaObject::Connection newInteractionConnection_;
|
||||
QMetaObject::Connection conversationClearedConnection;
|
||||
QMetaObject::Connection selectedCallChanged_;
|
||||
QMetaObject::Connection smartlistSelectionConnection_;
|
||||
|
|
|
@ -39,7 +39,14 @@ MessagesAdapter::MessagesAdapter(QObject *parent)
|
|||
MessagesAdapter::~MessagesAdapter() {}
|
||||
|
||||
void
|
||||
MessagesAdapter::initQmlObject() {}
|
||||
MessagesAdapter::initQmlObject() {
|
||||
connect(&LRCInstance::instance(),
|
||||
&LRCInstance::currentAccountChanged,
|
||||
[this](){
|
||||
connectConversationModel();
|
||||
});
|
||||
connectConversationModel();
|
||||
}
|
||||
|
||||
void
|
||||
MessagesAdapter::setupChatView(const QString &uid)
|
||||
|
|
Loading…
Add table
Reference in a new issue