Chat List: Let a timer do the model change

This commit is contained in:
Sebastian Wolf 2020-12-30 16:44:23 +01:00
parent e15c171640
commit 11058bc05a
No known key found for this signature in database
GPG key ID: CEA9522B5F38A90A

View file

@ -92,6 +92,11 @@ Page {
running: false
repeat: false
onTriggered: {
if (chatSearchField.text === "") {
chatListView.model = chatListModel;
} else {
chatListView.model = chatListProxyModel;
}
chatListProxyModel.setFilterWildcard("*" + chatSearchField.text + "*");
}
}
@ -325,7 +330,7 @@ Page {
clip: true
opacity: overviewPage.chatListCreated ? 1 : 0
Behavior on opacity { FadeAnimation {} }
model: chatSearchField.text !== "" ? chatListProxyModel : chatListModel
model: chatListModel
delegate: ChatListViewItem {
ownUserId: overviewPage.ownUserId
isVerified: is_verified