mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-25 16:47:20 +00:00
Move open group query into click handler
This commit is contained in:
parent
ffa280bc1b
commit
99f70e5c21
@ -153,12 +153,12 @@ class VisibleMessageView : LinearLayout {
|
|||||||
|
|
||||||
if (isGroupThread && !message.isOutgoing) {
|
if (isGroupThread && !message.isOutgoing) {
|
||||||
if (isEndOfMessageCluster) {
|
if (isEndOfMessageCluster) {
|
||||||
val openGroup = lokiThreadDb.getOpenGroupChat(threadID)
|
|
||||||
binding.profilePictureView.root.publicKey = senderSessionID
|
binding.profilePictureView.root.publicKey = senderSessionID
|
||||||
binding.profilePictureView.root.glide = glide
|
binding.profilePictureView.root.glide = glide
|
||||||
binding.profilePictureView.root.update(message.individualRecipient)
|
binding.profilePictureView.root.update(message.individualRecipient)
|
||||||
binding.profilePictureView.root.setOnClickListener {
|
binding.profilePictureView.root.setOnClickListener {
|
||||||
if (thread.isOpenGroupRecipient) {
|
if (thread.isOpenGroupRecipient) {
|
||||||
|
val openGroup = lokiThreadDb.getOpenGroupChat(threadID)
|
||||||
if (IdPrefix.fromValue(senderSessionID) == IdPrefix.BLINDED && openGroup?.canWrite == true) {
|
if (IdPrefix.fromValue(senderSessionID) == IdPrefix.BLINDED && openGroup?.canWrite == true) {
|
||||||
val intent = Intent(context, ConversationActivityV2::class.java)
|
val intent = Intent(context, ConversationActivityV2::class.java)
|
||||||
intent.putExtra(ConversationActivityV2.FROM_GROUP_THREAD_ID, threadID)
|
intent.putExtra(ConversationActivityV2.FROM_GROUP_THREAD_ID, threadID)
|
||||||
@ -170,7 +170,7 @@ class VisibleMessageView : LinearLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (thread.isOpenGroupRecipient) {
|
if (thread.isOpenGroupRecipient) {
|
||||||
openGroup ?: return
|
val openGroup = lokiThreadDb.getOpenGroupChat(threadID) ?: return
|
||||||
var standardPublicKey = ""
|
var standardPublicKey = ""
|
||||||
var blindedPublicKey: String? = null
|
var blindedPublicKey: String? = null
|
||||||
if (IdPrefix.fromValue(senderSessionID) == IdPrefix.BLINDED) {
|
if (IdPrefix.fromValue(senderSessionID) == IdPrefix.BLINDED) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user