adapt to new API

This commit is contained in:
B. Petersen
2018-10-07 18:27:59 +02:00
parent 28763e686d
commit 11eed61019
4 changed files with 7 additions and 14 deletions
+1 -1
View File
@@ -166,7 +166,7 @@ public class DcContext {
// working with raw c-data
private long contextCPtr; // CAVE: the name is referenced in the JNI
private native long createContextCPtr(String osName);
public native long createMsgCPtr ();
public native long createMsgCPtr (int viewtype);
private native long getChatlistCPtr (int listflags, String query, int queryId);
private native long getChatCPtr (int chat_id);
private native long getMsgCPtr (int id);
+2 -3
View File
@@ -57,8 +57,8 @@ public class DcMsg {
public final static int DC_MSG_ID_MARKER1 = 1;
public final static int DC_MSG_ID_DAYMARKER = 9;
public DcMsg(DcContext context) {
msgCPtr = context.createMsgCPtr();
public DcMsg(DcContext context, int viewtype) {
msgCPtr = context.createMsgCPtr(viewtype);
}
public DcMsg(long msgCPtr) {
@@ -107,7 +107,6 @@ public class DcMsg {
public native boolean isSetupMessage ();
public native String getSetupCodeBegin ();
public native boolean isIncreation ();
public native void setType (int type);
public native void setText (String text);
public native void setFile (String file, String filemime);
public native void setDimension (int width, int height);
@@ -345,7 +345,7 @@ public class ConversationFragment extends Fragment
StringBuilder result = new StringBuilder();
DcMsg prevMsg = new DcMsg(dcContext);
DcMsg prevMsg = new DcMsg(dcContext, DcMsg.DC_MSG_TEXT);
for (DcMsg msg : dcMsgsList) {
if (result.length()>0) {
result.append("\n\n");