diff --git a/jni/dc_wrapper.c b/jni/dc_wrapper.c index e0e4b0bf1..0b910dc1b 100644 --- a/jni/dc_wrapper.c +++ b/jni/dc_wrapper.c @@ -1364,12 +1364,6 @@ JNIEXPORT jint Java_com_b44t_messenger_DcMsg_getId(JNIEnv *env, jobject obj) return dc_msg_get_id(get_dc_msg(env, obj)); } - -JNIEXPORT jboolean Java_com_b44t_messenger_DcMsg_isOutgoing(JNIEnv *env, jobject obj) -{ - return (jboolean)(dc_msg_is_outgoing(get_dc_msg(env, obj))!=0); -} - JNIEXPORT jint Java_com_b44t_messenger_DcMsg_getSenderColor(JNIEnv *env, jobject obj) { return dc_msg_get_sender_color(get_dc_msg(env, obj)); diff --git a/jni/deltachat-core-rust b/jni/deltachat-core-rust index ba15bba35..7da0662be 160000 --- a/jni/deltachat-core-rust +++ b/jni/deltachat-core-rust @@ -1 +1 @@ -Subproject commit ba15bba35dc995006854287b5a8842dfd43ee5f1 +Subproject commit 7da0662be076f5206e8c95d061461c38fc4dee7e diff --git a/src/main/java/com/b44t/messenger/DcMsg.java b/src/main/java/com/b44t/messenger/DcMsg.java index 56b5b7f18..83db626c0 100644 --- a/src/main/java/com/b44t/messenger/DcMsg.java +++ b/src/main/java/com/b44t/messenger/DcMsg.java @@ -169,7 +169,6 @@ public JSONObject getWebxdcInfo () { public native String getQuotedText (); public native String getError (); public native String getOverrideSenderName(); - public native boolean isOutgoing(); public native int getSenderColor(); public String getSenderName(DcContact dcContact) { @@ -210,6 +209,10 @@ public static int[] msgSetToIds(final Set dcMsgs) { return ids; } + public boolean isOutgoing() { + return getFromId() == DcContact.DC_CONTACT_ID_SELF; + } + public String getDisplayBody() { return getText(); } diff --git a/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java b/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java index 527e7e331..bf24fda4f 100644 --- a/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java +++ b/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java @@ -124,9 +124,6 @@ public void onCreate() { e.printStackTrace(); } } - if ("deltafans@nine.testrun.org".equals(ac.getConfig("configured_addr")) && !ac.isCommunity()) { - ac.setCommunityMode(true); - } } if (allAccounts.length == 0) { dcAccounts.addAccount(); @@ -232,11 +229,10 @@ public void onReceive(Context context, Intent intent) { TimeUnit.MILLISECONDS) .setConstraints(constraints) .build(); - try { - // in Android 4 this throws exception due to R8/shrinking - WorkManager.getInstance(this) - .enqueueUniquePeriodicWork("FetchWorker", ExistingPeriodicWorkPolicy.KEEP, fetchWorkRequest); - } catch (Throwable e) {} + WorkManager.getInstance(this).enqueueUniquePeriodicWork( + "FetchWorker", + ExistingPeriodicWorkPolicy.KEEP, + fetchWorkRequest); AppCompatDelegate.setCompatVectorFromResourcesEnabled(true); if (Prefs.isPushEnabled(this)) {