fix transfer message chat list again #LINQT-2246

This commit is contained in:
gaelle 2026-01-07 16:04:16 +01:00
parent eb1a94fc01
commit 3fb39cbb59
4 changed files with 4 additions and 2 deletions

View file

@ -50,7 +50,7 @@ ChatList::ChatList(QObject *parent) : ListProxy(parent) {
ChatList::~ChatList() {
mustBeInMainThread("~" + getClassName());
mModelConnection = nullptr;
mModelConnection->disconnect();
}
void ChatList::connectItem(QSharedPointer<ChatCore> chat) {

View file

@ -26,6 +26,8 @@
DEFINE_ABSTRACT_OBJECT(ChatProxy)
ChatProxy::ChatProxy(QObject *parent) {
mList = ChatList::create();
setSourceModel(mList.get());
}
ChatProxy::~ChatProxy() {

View file

@ -40,7 +40,6 @@ ListView {
model: ChatProxy {
id: chatProxy
filterText: mainItem.searchText
model: AppCpp.chats
onFilterTextChanged: {
chatToSelectLater = currentChatGui
}

View file

@ -212,6 +212,7 @@ AbstractMainPage {
id: chatListView
Layout.fillWidth: true
Layout.fillHeight: true
chatProxy.model: AppCpp.chats
Layout.topMargin: Utils.getSizeWithScreenRatio(39)
searchBar: searchBar
Control.ScrollBar.vertical: scrollbar