aboutsummaryrefslogtreecommitdiff
path: root/context.cpp
diff options
context:
space:
mode:
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};
}