diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/HomeActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/HomeActivity.kt index b38750bb7e..b5c02f6bd7 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/HomeActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/HomeActivity.kt @@ -52,10 +52,9 @@ import org.thoughtcrime.securesms.mms.GlideRequests import java.io.IOException class HomeActivity : PassphraseRequiredActionBarActivity(), - ConversationClickListener, - SeedReminderViewDelegate, - NewConversationButtonSetViewDelegate { - + ConversationClickListener, + SeedReminderViewDelegate, + NewConversationButtonSetViewDelegate { private lateinit var glide: GlideRequests private var broadcastReceiver: BroadcastReceiver? = null @@ -173,7 +172,6 @@ class HomeActivity : PassphraseRequiredActionBarActivity(), if (hasViewedSeed) { seedReminderView.visibility = View.GONE } - showFileServerInstabilityNotificationIfNeeded() if (TextSecurePreferences.getConfigurationMessageSynced(this)) { lifecycleScope.launch(Dispatchers.IO) { MultiDeviceProtocol.syncConfigurationIfNeeded(this@HomeActivity) @@ -181,13 +179,6 @@ class HomeActivity : PassphraseRequiredActionBarActivity(), } } - private fun showFileServerInstabilityNotificationIfNeeded() { - val hasSeenNotification = TextSecurePreferences.hasSeenFileServerInstabilityNotification(this) - if (hasSeenNotification) { return } - FileServerDialog().show(supportFragmentManager, "File Server Dialog") - TextSecurePreferences.setHasSeenFileServerInstabilityNotification(this) - } - override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { super.onActivityResult(requestCode, resultCode, data) if (resultCode == CreateClosedGroupActivity.closedGroupCreatedResultCode) { @@ -356,7 +347,9 @@ class HomeActivity : PassphraseRequiredActionBarActivity(), apiDB.removeLastDeletionServerID(v2OpenGroup.room, v2OpenGroup.server) OpenGroupManager.delete(v2OpenGroup.server, v2OpenGroup.room, this@HomeActivity) } else { - threadDB.deleteConversation(threadID) + ThreadUtils.queue { + threadDB.deleteConversation(threadID) + } } // Update the badge count ApplicationContext.getInstance(context).messageNotifier.updateNotification(context) diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/dialogs/FileServerDialog.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/dialogs/FileServerDialog.kt deleted file mode 100644 index c3a0d7d7b1..0000000000 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/dialogs/FileServerDialog.kt +++ /dev/null @@ -1,33 +0,0 @@ -package org.thoughtcrime.securesms.loki.dialogs - -import android.app.Dialog -import android.content.ClipData -import android.content.ClipboardManager -import android.content.Context -import android.graphics.Color -import android.graphics.drawable.ColorDrawable -import android.os.Bundle -import android.view.LayoutInflater -import android.widget.Toast -import androidx.appcompat.app.AlertDialog -import androidx.fragment.app.DialogFragment -import kotlinx.android.synthetic.main.dialog_file_server.view.* -import kotlinx.android.synthetic.main.dialog_seed.view.* -import network.loki.messenger.R -import org.session.libsession.utilities.IdentityKeyUtil -import org.thoughtcrime.securesms.loki.utilities.MnemonicUtilities -import org.session.libsignal.crypto.MnemonicCodec -import org.session.libsignal.utilities.hexEncodedPrivateKey - -class FileServerDialog : DialogFragment() { - - override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { - val builder = AlertDialog.Builder(requireContext()) - val contentView = LayoutInflater.from(requireContext()).inflate(R.layout.dialog_file_server, null) - contentView.okButton.setOnClickListener { dismiss() } - builder.setView(contentView) - val result = builder.create() - result.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT)) - return result - } -} \ No newline at end of file diff --git a/app/src/main/res/layout/dialog_file_server.xml b/app/src/main/res/layout/dialog_file_server.xml deleted file mode 100644 index 8b4a4c12eb..0000000000 --- a/app/src/main/res/layout/dialog_file_server.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - -