mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-19 19:08:26 +00:00
Fix threading issue
This commit is contained in:
parent
d3704a6905
commit
4989bf4b8b
@ -382,10 +382,12 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
||||
// endregion
|
||||
|
||||
override fun onModified(recipient: Recipient) {
|
||||
if (thread.isContactRecipient) {
|
||||
blockedBanner.isVisible = thread.isBlocked
|
||||
runOnUiThread {
|
||||
if (thread.isContactRecipient) {
|
||||
blockedBanner.isVisible = thread.isBlocked
|
||||
}
|
||||
updateSubtitle()
|
||||
}
|
||||
updateSubtitle()
|
||||
}
|
||||
|
||||
private fun markAllAsRead() {
|
||||
|
@ -411,7 +411,6 @@ public class SmsDatabase extends MessagingDatabase {
|
||||
|
||||
notifyConversationListeners(threadId);
|
||||
|
||||
|
||||
return Optional.of(new InsertResult(messageId, threadId));
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
package org.thoughtcrime.securesms.database
|
||||
|
||||
import android.app.job.JobScheduler
|
||||
import android.content.Context
|
||||
import android.net.Uri
|
||||
import org.session.libsession.database.StorageProtocol
|
||||
@ -105,7 +104,7 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
|
||||
}
|
||||
else -> Optional.absent()
|
||||
}
|
||||
val pointerAttachments = attachments.mapNotNull {
|
||||
val pointers = attachments.mapNotNull {
|
||||
it.toSignalAttachment()
|
||||
}
|
||||
val targetAddress = if (isUserSender && !message.syncTarget.isNullOrEmpty()) {
|
||||
@ -121,7 +120,7 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
|
||||
val linkPreviews: Optional<List<LinkPreview>> = if (linkPreview.isEmpty()) Optional.absent() else Optional.of(linkPreview.mapNotNull { it!! })
|
||||
val mmsDatabase = DatabaseFactory.getMmsDatabase(context)
|
||||
val insertResult = if (message.sender == getUserPublicKey()) {
|
||||
val mediaMessage = OutgoingMediaMessage.from(message, targetRecipient, pointerAttachments, quote.orNull(), linkPreviews.orNull()?.firstOrNull())
|
||||
val mediaMessage = OutgoingMediaMessage.from(message, targetRecipient, pointers, quote.orNull(), linkPreviews.orNull()?.firstOrNull())
|
||||
mmsDatabase.insertSecureDecryptedMessageOutbox(mediaMessage, message.threadID ?: -1, message.sentTimestamp!!)
|
||||
} else {
|
||||
// It seems like we have replaced SignalServiceAttachment with SessionServiceAttachment
|
||||
|
Loading…
x
Reference in New Issue
Block a user