mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-19 20:18:26 +00:00
Expiration message feedback
This commit is contained in:
parent
acbeaad71c
commit
1b6f7bc3fa
@ -15,7 +15,6 @@ import dagger.hilt.android.AndroidEntryPoint
|
||||
import network.loki.messenger.R
|
||||
import network.loki.messenger.databinding.ViewConversationBinding
|
||||
import org.session.libsession.utilities.ThemeUtil
|
||||
import org.session.libsession.utilities.getColorFromAttr
|
||||
import org.session.libsession.utilities.recipients.Recipient
|
||||
import org.thoughtcrime.securesms.conversation.v2.utilities.MentionUtilities.highlightMentions
|
||||
import org.thoughtcrime.securesms.database.RecipientDatabase.NOTIFY_TYPE_ALL
|
||||
@ -50,16 +49,6 @@ class ConversationView : LinearLayout {
|
||||
|
||||
// region Updating
|
||||
fun bind(thread: ThreadRecord, isTyping: Boolean) {
|
||||
if (thread.isLeavingGroup) {
|
||||
binding.conversationViewDisplayNameTextView.setTextColor(context.getColorFromAttr(android.R.attr.textColorSecondary))
|
||||
binding.snippetTextView.setTextColor(context.getColorFromAttr(android.R.attr.textColorSecondary))
|
||||
} else if (thread.isErrorLeavingGroup) {
|
||||
binding.conversationViewDisplayNameTextView.setTextColor(context.getColorFromAttr(android.R.attr.textColorPrimary))
|
||||
binding.snippetTextView.setTextColor(context.getColorFromAttr(R.attr.danger))
|
||||
} else {
|
||||
binding.conversationViewDisplayNameTextView.setTextColor(context.getColorFromAttr(android.R.attr.textColorPrimary))
|
||||
binding.snippetTextView.setTextColor(context.getColorFromAttr(android.R.attr.textColorPrimary))
|
||||
}
|
||||
this.thread = thread
|
||||
if (thread.isPinned) {
|
||||
binding.conversationViewDisplayNameTextView.setCompoundDrawablesRelativeWithIntrinsicBounds(
|
||||
|
@ -102,17 +102,9 @@ data class VisibleMessage(
|
||||
val pointers = attachments.mapNotNull { Attachment.createAttachmentPointer(it) }
|
||||
dataMessage.addAllAttachments(pointers)
|
||||
// TODO: Contact
|
||||
// Expiration timer
|
||||
// Expiration timer on the message
|
||||
proto.applyExpiryMode()
|
||||
// Group context
|
||||
val storage = MessagingModuleConfiguration.shared.storage
|
||||
val context = MessagingModuleConfiguration.shared.context
|
||||
val expiration = if (storage.isLegacyClosedGroup(recipient!!)) {
|
||||
Recipient.from(context, Address.fromSerialized(GroupUtil.doubleEncodeGroupID(recipient!!)), false).expireMessages
|
||||
} else {
|
||||
Recipient.from(context, Address.fromSerialized(recipient!!), false).expireMessages
|
||||
}
|
||||
dataMessage.expireTimer = expiration
|
||||
|
||||
// Community blocked message requests flag
|
||||
dataMessage.blocksCommunityMessageRequests = blocksMessageRequests
|
||||
// Sync target
|
||||
|
Loading…
x
Reference in New Issue
Block a user