diff --git a/app/build.gradle b/app/build.gradle index 4cc0eb1f8a..85214e2b96 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -75,7 +75,6 @@ dependencies { annotationProcessor 'com.squareup.dagger:dagger-compiler:1.2.2' kapt 'com.squareup.dagger:dagger-compiler:1.2.2' implementation 'mobi.upod:time-duration-picker:1.1.3' - implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1' implementation 'com.google.zxing:core:3.2.1' implementation ('com.davemorrissey.labs:subsampling-scale-image-view:3.6.0') { exclude group: 'com.android.support', module: 'support-annotations' @@ -106,8 +105,8 @@ dependencies { implementation project(":libsession") implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.0.1" implementation "org.whispersystems:curve25519-java:$curve25519Version" - implementation "com.goterl.lazycode:lazysodium-android:4.2.0@aar" - implementation "net.java.dev.jna:jna:5.5.0@aar" + implementation 'com.goterl:lazysodium-android:5.0.2@aar' + implementation "net.java.dev.jna:jna:5.8.0@aar" implementation "com.google.protobuf:protobuf-java:$protobufVersion" implementation "com.fasterxml.jackson.core:jackson-databind:$jacksonDatabindVersion" implementation "com.squareup.okhttp3:okhttp:$okhttpVersion" 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/activities/RegisterActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/RegisterActivity.kt index d84c1bc975..c9e5bd83cc 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/RegisterActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/RegisterActivity.kt @@ -15,15 +15,15 @@ import android.text.style.ClickableSpan import android.text.style.StyleSpan import android.view.View import android.widget.Toast -import com.goterl.lazycode.lazysodium.utils.KeyPair +import com.goterl.lazysodium.utils.KeyPair import kotlinx.android.synthetic.main.activity_register.* import network.loki.messenger.R +import org.session.libsession.utilities.KeyPairUtilities import org.session.libsession.utilities.TextSecurePreferences import org.session.libsignal.crypto.ecc.ECKeyPair import org.session.libsignal.utilities.KeyHelper import org.session.libsignal.utilities.hexEncodedPublicKey import org.thoughtcrime.securesms.BaseActionBarActivity -import org.session.libsession.utilities.KeyPairUtilities import org.thoughtcrime.securesms.loki.utilities.push import org.thoughtcrime.securesms.loki.utilities.setUpActionBarSessionLogo import java.util.* 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 @@ - - - - - - - - - -