Chat List: Let a timer do the model change
This commit is contained in:
parent
e15c171640
commit
11058bc05a
1 changed files with 6 additions and 1 deletions
|
@ -92,6 +92,11 @@ Page {
|
||||||
running: false
|
running: false
|
||||||
repeat: false
|
repeat: false
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
|
if (chatSearchField.text === "") {
|
||||||
|
chatListView.model = chatListModel;
|
||||||
|
} else {
|
||||||
|
chatListView.model = chatListProxyModel;
|
||||||
|
}
|
||||||
chatListProxyModel.setFilterWildcard("*" + chatSearchField.text + "*");
|
chatListProxyModel.setFilterWildcard("*" + chatSearchField.text + "*");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -325,7 +330,7 @@ Page {
|
||||||
clip: true
|
clip: true
|
||||||
opacity: overviewPage.chatListCreated ? 1 : 0
|
opacity: overviewPage.chatListCreated ? 1 : 0
|
||||||
Behavior on opacity { FadeAnimation {} }
|
Behavior on opacity { FadeAnimation {} }
|
||||||
model: chatSearchField.text !== "" ? chatListProxyModel : chatListModel
|
model: chatListModel
|
||||||
delegate: ChatListViewItem {
|
delegate: ChatListViewItem {
|
||||||
ownUserId: overviewPage.ownUserId
|
ownUserId: overviewPage.ownUserId
|
||||||
isVerified: is_verified
|
isVerified: is_verified
|
||||||
|
|
Loading…
Reference in a new issue