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 /context.cpp | |
parent | e225605ff433ba2ebbfcf5d0d6889e1fd45d6d32 (diff) | |
download | kdeltachat-6d828b2ba8ad4b0586853cbdf4f1b32b8a2bf753.tar.gz kdeltachat-6d828b2ba8ad4b0586853cbdf4f1b32b8a2bf753.zip |
Add chatlist search
Diffstat (limited to 'context.cpp')
-rw-r--r-- | context.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/context.cpp b/context.cpp index a4e58db..53cdd82 100644 --- a/context.cpp +++ b/context.cpp @@ -56,9 +56,14 @@ Context::getInfo() } DcChatlist * -Context::getChatlist(int flags) +Context::getChatlist(int flags, QString query) { - dc_chatlist_t *chatlist = dc_get_chatlist(m_context, flags, NULL, 0); + QByteArray utf8Query = query.toUtf8(); + dc_chatlist_t *chatlist = dc_get_chatlist( + m_context, flags, + query.isEmpty() ? nullptr : utf8Query.constData(), + 0 + ); return new DcChatlist{chatlist}; } |