diff options
Diffstat (limited to 'qml')
-rw-r--r-- | qml/ChatlistPage.qml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/qml/ChatlistPage.qml b/qml/ChatlistPage.qml index 7a9877b..17b0dc3 100644 --- a/qml/ChatlistPage.qml +++ b/qml/ChatlistPage.qml @@ -36,6 +36,12 @@ Kirigami.ScrollablePage { updateChatlist() } + header: Kirigami.SearchField { + id: searchField + + onTextChanged: chatlistPage.updateChatlist() + } + mainAction: Kirigami.Action { text: "New chat" iconName: "list-add" @@ -91,7 +97,8 @@ Kirigami.ScrollablePage { } function updateChatlist() { - let chatlist = chatlistPage.context.getChatlist(chatlistPage.archivedOnly ? 1 : 0) + let chatlist = chatlistPage.context.getChatlist(chatlistPage.archivedOnly ? 1 : 0, + searchField.text) // Merge new chatlist with existing one. // To preserve selected item, we do not simply clear and fill |