mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Merge pull request #1123 from deltachat/adapt-to-new-api
adapt to new api
This commit is contained in:
+14
-2
@@ -656,9 +656,21 @@ JNIEXPORT jint Java_com_b44t_messenger_DcContext_sendTextMsg(JNIEnv *env, jobjec
|
||||
}
|
||||
|
||||
|
||||
JNIEXPORT jint Java_com_b44t_messenger_DcContext_addDeviceMsg(JNIEnv *env, jobject obj, jobject msg)
|
||||
JNIEXPORT jint Java_com_b44t_messenger_DcContext_addDeviceMsg(JNIEnv *env, jobject obj, jstring label, jobject msg)
|
||||
{
|
||||
return dc_add_device_msg(get_dc_context(env, obj), get_dc_msg(env, msg));
|
||||
CHAR_REF(label);
|
||||
int msg_id = dc_add_device_msg(get_dc_context(env, obj), labelPtr, get_dc_msg(env, msg));
|
||||
CHAR_UNREF(label);
|
||||
return msg_id;
|
||||
}
|
||||
|
||||
|
||||
JNIEXPORT jboolean Java_com_b44t_messenger_DcContext_wasDeviceMsgEverAdded(JNIEnv *env, jobject obj, jstring label)
|
||||
{
|
||||
CHAR_REF(label);
|
||||
jboolean ret = dc_was_device_msg_ever_added(get_dc_context(env, obj), labelPtr) != 0;
|
||||
CHAR_UNREF(label);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -156,7 +156,8 @@ public class DcContext {
|
||||
public native int prepareMsg (int chat_id, DcMsg msg);
|
||||
public native int sendMsg (int chat_id, DcMsg msg);
|
||||
public native int sendTextMsg (int chat_id, String text);
|
||||
public native int addDeviceMsg (DcMsg msg);
|
||||
public native int addDeviceMsg (String label, DcMsg msg);
|
||||
public native boolean wasDeviceMsgEverAdded(String label);
|
||||
public native int checkQrCPtr (String qr);
|
||||
public @NonNull DcLot checkQr (String qr) { return new DcLot(checkQrCPtr(qr)); }
|
||||
public native String getSecurejoinQr (int chat_id);
|
||||
|
||||
Reference in New Issue
Block a user