mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
adapt to new API
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user