aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--context.cpp5
-rw-r--r--context.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/context.cpp b/context.cpp
index 8df8120..82b9a6e 100644
--- a/context.cpp
+++ b/context.cpp
@@ -80,6 +80,11 @@ Context::getMsgIdList(uint32_t chatId) {
return result;
}
+int
+Context::getFreshMsgCnt(uint32_t chatId) {
+ return dc_get_fresh_msg_cnt(m_context, chatId);
+}
+
DcMessage *
Context::getMessage(uint32_t msgId)
{
diff --git a/context.h b/context.h
index 756adc6..8e6b02c 100644
--- a/context.h
+++ b/context.h
@@ -28,6 +28,7 @@ public:
Q_INVOKABLE DcChatlist *getChatlist();
Q_INVOKABLE DcChat *getChat(uint32_t chatId);
Q_INVOKABLE QVariantList getMsgIdList(uint32_t chatId);
+ Q_INVOKABLE int getFreshMsgCnt(uint32_t chatId);
Q_INVOKABLE DcMessage *getMessage(uint32_t msgId);
Q_INVOKABLE DcContact *getContact(uint32_t contactId);
Q_INVOKABLE uint32_t sendTextMessage(uint32_t chatId, QString textToSend);