|
|
|
@ -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(
|
|
|
|
|