mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Adapt getFreshMsgCount() to new core.
This commit is contained in:
@@ -450,6 +450,13 @@ JNIEXPORT void Java_com_b44t_messenger_MrMailbox_deleteChat(JNIEnv *env, jclass
|
||||
|
||||
/* MrMailbox - handle messages */
|
||||
|
||||
|
||||
JNIEXPORT jint Java_com_b44t_messenger_MrMailbox_getFreshMsgCount(JNIEnv *env, jclass cls, jint chat_id)
|
||||
{
|
||||
return mrmailbox_get_fresh_msg_count(get_mrmailbox_t(env, cls), chat_id);
|
||||
}
|
||||
|
||||
|
||||
JNIEXPORT jlong Java_com_b44t_messenger_MrMailbox_MrMailboxGetMsg(JNIEnv *env, jclass c, jlong hMailbox, jint id)
|
||||
{
|
||||
return (jlong)mrmailbox_get_msg((mrmailbox_t*)hMailbox, id);
|
||||
@@ -789,12 +796,6 @@ JNIEXPORT jint Java_com_b44t_messenger_MrChat_MrChatGetDraftReplyToMsgId(JNIEnv
|
||||
}
|
||||
|
||||
|
||||
JNIEXPORT jint Java_com_b44t_messenger_MrChat_getFreshMsgCount(JNIEnv *env, jclass cls)
|
||||
{
|
||||
return mrchat_get_fresh_msg_count(get_mrchat_t(env, cls));
|
||||
}
|
||||
|
||||
|
||||
JNIEXPORT jint Java_com_b44t_messenger_MrChat_MrChatSetDraft(JNIEnv *env, jclass c, jlong hChat, jstring draft /* NULL=delete */, jint replyToMsgId)
|
||||
{
|
||||
CHAR_REF(draft);
|
||||
|
||||
@@ -493,7 +493,7 @@ public class ChatlistCell extends BaseCell {
|
||||
|
||||
public void update(int mask) {
|
||||
if( m_showUnreadCount ) {
|
||||
unreadCount = m_mrChat.getFreshMsgCount();
|
||||
unreadCount = MrMailbox.getFreshMsgCount(m_mrChat.getId());
|
||||
}
|
||||
|
||||
if (mask != 0) {
|
||||
|
||||
@@ -74,7 +74,6 @@ public class MrChat {
|
||||
public int setDraft(String draft/*NULL=delete*/, long replyToMsgId) {
|
||||
return MrChatSetDraft(m_hChat, draft, replyToMsgId);
|
||||
}
|
||||
public native int getFreshMsgCount();
|
||||
|
||||
private long m_hChat; // must not be renamed as referenced by JNI under the name "m_hChat"
|
||||
private native static void MrChatUnref (long hChat);
|
||||
|
||||
@@ -165,6 +165,8 @@ public class MrMailbox {
|
||||
return MrMailboxGetMsgInfo(m_hMailbox, id);
|
||||
}
|
||||
|
||||
public static native int getFreshMsgCount(int chat_id);
|
||||
|
||||
public native static void deleteMsgs(int msg_ids[]);
|
||||
public native static void forwardMsgs(int msg_ids[], int chat_ids);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user