Move open group query into click handler

This commit is contained in:
charles 2022-10-03 13:42:47 +11:00
parent ffa280bc1b
commit 99f70e5c21

View File

@ -153,12 +153,12 @@ class VisibleMessageView : LinearLayout {
if (isGroupThread && !message.isOutgoing) {
if (isEndOfMessageCluster) {
val openGroup = lokiThreadDb.getOpenGroupChat(threadID)
binding.profilePictureView.root.publicKey = senderSessionID
binding.profilePictureView.root.glide = glide
binding.profilePictureView.root.update(message.individualRecipient)
binding.profilePictureView.root.setOnClickListener {
if (thread.isOpenGroupRecipient) {
val openGroup = lokiThreadDb.getOpenGroupChat(threadID)
if (IdPrefix.fromValue(senderSessionID) == IdPrefix.BLINDED && openGroup?.canWrite == true) {
val intent = Intent(context, ConversationActivityV2::class.java)
intent.putExtra(ConversationActivityV2.FROM_GROUP_THREAD_ID, threadID)
@ -170,7 +170,7 @@ class VisibleMessageView : LinearLayout {
}
}
if (thread.isOpenGroupRecipient) {
openGroup ?: return
val openGroup = lokiThreadDb.getOpenGroupChat(threadID) ?: return
var standardPublicKey = ""
var blindedPublicKey: String? = null
if (IdPrefix.fromValue(senderSessionID) == IdPrefix.BLINDED) {