check device-messages after configure and on each chatlist-opening

This commit is contained in:
B. Petersen
2019-11-20 00:12:33 +01:00
parent ab30d47398
commit a054acd3c9
3 changed files with 9 additions and 0 deletions
+6
View File
@@ -674,6 +674,12 @@ JNIEXPORT jboolean Java_com_b44t_messenger_DcContext_wasDeviceMsgEverAdded(JNIEn
}
JNIEXPORT void Java_com_b44t_messenger_DcContext_updateDeviceChats(JNIEnv *env, jobject obj)
{
dc_update_device_chats(get_dc_context(env, obj));
}
/* DcContext - handle config */
JNIEXPORT void Java_com_b44t_messenger_DcContext_setConfig(JNIEnv *env, jobject obj, jstring key, jstring value /*may be NULL*/)
+1
View File
@@ -158,6 +158,7 @@ public class DcContext {
public native int sendTextMsg (int chat_id, String text);
public native int addDeviceMsg (String label, DcMsg msg);
public native boolean wasDeviceMsgEverAdded(String label);
public native void updateDeviceChats ();
public @NonNull DcLot checkQr (String qr) { return new DcLot(checkQrCPtr(qr)); }
public native String getSecurejoinQr (int chat_id);
public native int joinSecurejoin (String qr);
@@ -34,6 +34,7 @@ import com.google.zxing.integration.android.IntentIntegrator;
import com.google.zxing.integration.android.IntentResult;
import org.thoughtcrime.securesms.components.SearchToolbar;
import org.thoughtcrime.securesms.connect.DcHelper;
import org.thoughtcrime.securesms.map.MapActivity;
import org.thoughtcrime.securesms.qr.QrCodeHandler;
import org.thoughtcrime.securesms.search.SearchFragment;
@@ -78,6 +79,7 @@ public class ConversationListActivity extends PassphraseRequiredActionBarActivit
@Override
protected void onCreate(Bundle icicle, boolean ready) {
DcHelper.getContext(this).updateDeviceChats();
setContentView(R.layout.conversation_list_activity);
Toolbar toolbar = findViewById(R.id.toolbar);