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