fix transfer message chat list again #LINQT-2246
This commit is contained in:
parent
eb1a94fc01
commit
3fb39cbb59
4 changed files with 4 additions and 2 deletions
|
|
@ -50,7 +50,7 @@ ChatList::ChatList(QObject *parent) : ListProxy(parent) {
|
||||||
|
|
||||||
ChatList::~ChatList() {
|
ChatList::~ChatList() {
|
||||||
mustBeInMainThread("~" + getClassName());
|
mustBeInMainThread("~" + getClassName());
|
||||||
mModelConnection = nullptr;
|
mModelConnection->disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatList::connectItem(QSharedPointer<ChatCore> chat) {
|
void ChatList::connectItem(QSharedPointer<ChatCore> chat) {
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,8 @@
|
||||||
DEFINE_ABSTRACT_OBJECT(ChatProxy)
|
DEFINE_ABSTRACT_OBJECT(ChatProxy)
|
||||||
|
|
||||||
ChatProxy::ChatProxy(QObject *parent) {
|
ChatProxy::ChatProxy(QObject *parent) {
|
||||||
|
mList = ChatList::create();
|
||||||
|
setSourceModel(mList.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
ChatProxy::~ChatProxy() {
|
ChatProxy::~ChatProxy() {
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,6 @@ ListView {
|
||||||
model: ChatProxy {
|
model: ChatProxy {
|
||||||
id: chatProxy
|
id: chatProxy
|
||||||
filterText: mainItem.searchText
|
filterText: mainItem.searchText
|
||||||
model: AppCpp.chats
|
|
||||||
onFilterTextChanged: {
|
onFilterTextChanged: {
|
||||||
chatToSelectLater = currentChatGui
|
chatToSelectLater = currentChatGui
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -212,6 +212,7 @@ AbstractMainPage {
|
||||||
id: chatListView
|
id: chatListView
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
chatProxy.model: AppCpp.chats
|
||||||
Layout.topMargin: Utils.getSizeWithScreenRatio(39)
|
Layout.topMargin: Utils.getSizeWithScreenRatio(39)
|
||||||
searchBar: searchBar
|
searchBar: searchBar
|
||||||
Control.ScrollBar.vertical: scrollbar
|
Control.ScrollBar.vertical: scrollbar
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue