aboutsummaryrefslogtreecommitdiff
path: root/context.cpp
diff options
context:
space:
mode:
authorlink2xt <link2xt@testrun.org>2021-08-22 11:54:26 +0000
committerlink2xt <link2xt@testrun.org>2021-08-22 11:54:26 +0000
commit6d828b2ba8ad4b0586853cbdf4f1b32b8a2bf753 (patch)
tree15197d8b07b70f512a6d40a05c22539eb1fac7f1 /context.cpp
parente225605ff433ba2ebbfcf5d0d6889e1fd45d6d32 (diff)
downloadkdeltachat-6d828b2ba8ad4b0586853cbdf4f1b32b8a2bf753.tar.gz
kdeltachat-6d828b2ba8ad4b0586853cbdf4f1b32b8a2bf753.zip
Add chatlist search
Diffstat (limited to 'context.cpp')
-rw-r--r--context.cpp9
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};
}