diff options
author | link2xt <link2xt@testrun.org> | 2021-08-22 11:54:26 +0000 |
---|---|---|
committer | link2xt <link2xt@testrun.org> | 2021-08-22 11:54:26 +0000 |
commit | 6d828b2ba8ad4b0586853cbdf4f1b32b8a2bf753 (patch) | |
tree | 15197d8b07b70f512a6d40a05c22539eb1fac7f1 /qml | |
parent | e225605ff433ba2ebbfcf5d0d6889e1fd45d6d32 (diff) | |
download | kdeltachat-6d828b2ba8ad4b0586853cbdf4f1b32b8a2bf753.tar.gz kdeltachat-6d828b2ba8ad4b0586853cbdf4f1b32b8a2bf753.zip |
Add chatlist search
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 |