From e8d007dce4823c23bdde850bfedc25d85abc9b6f Mon Sep 17 00:00:00 2001 From: Ryan ZHAO Date: Tue, 9 Feb 2021 15:42:07 +1100 Subject: [PATCH] force sync message when clearing data --- .../thoughtcrime/securesms/loki/dialogs/ClearAllDataDialog.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/dialogs/ClearAllDataDialog.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/dialogs/ClearAllDataDialog.kt index 3dbbfe2ebc..4a14d23ced 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/dialogs/ClearAllDataDialog.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/dialogs/ClearAllDataDialog.kt @@ -10,6 +10,7 @@ import android.view.LayoutInflater import kotlinx.android.synthetic.main.dialog_clear_all_data.view.* import network.loki.messenger.R import org.thoughtcrime.securesms.ApplicationContext +import org.thoughtcrime.securesms.loki.protocol.MultiDeviceProtocol import org.thoughtcrime.securesms.loki.utilities.KeyPairUtilities class ClearAllDataDialog : DialogFragment() { @@ -27,6 +28,7 @@ class ClearAllDataDialog : DialogFragment() { private fun clearAllData() { if (KeyPairUtilities.hasV2KeyPair(requireContext())) { + MultiDeviceProtocol.forceSyncConfigurationNowIfNeeded(requireContext()) ApplicationContext.getInstance(context).clearAllData(false) } else { val dialog = AlertDialog.Builder(requireContext())