Fix bug allowing creation of new and sending in existing MMS groups.

This commit is contained in:
Cody Henthorne
2023-11-16 12:25:04 -05:00
committed by Greyson Parrelli
parent df4bd1fa4a
commit 19626361ec
4 changed files with 31 additions and 6 deletions

View File

@@ -133,10 +133,16 @@ class DisabledInputView @JvmOverloads constructor(
existingView = inviteToSignal,
create = { inflater.inflate(R.layout.conversation_activity_sms_export_stub, this, false) },
bind = {
findViewById<TextView>(R.id.export_sms_message).text = context.getString(R.string.ConversationActivity__sms_messaging_is_no_longer_supported_in_signal_invite_s_to_to_signal_to_keep_the_conversation_here, recipient.getDisplayName(context))
findViewById<TextView>(R.id.export_sms_message).text = if (recipient.isMmsGroup) {
context.getString(R.string.ConversationActivity__sms_messaging_is_no_longer_supported)
} else {
context.getString(R.string.ConversationActivity__sms_messaging_is_no_longer_supported_in_signal_invite_s_to_to_signal_to_keep_the_conversation_here, recipient.getDisplayName(context))
}
findViewById<MaterialButton>(R.id.export_sms_button).apply {
setText(R.string.ConversationActivity__invite_to_signal)
setOnClickListener { listener?.onInviteToSignal(recipient) }
visible = !recipient.isMmsGroup
}
}
)

View File

@@ -28,7 +28,7 @@ class InputReadyState(
val isRequestingMember: Boolean? = selfMemberLevel?.equals(GroupTable.MemberLevel.REQUESTING_MEMBER)
fun shouldShowInviteToSignal(): Boolean {
return !conversationRecipient.isGroup &&
return !conversationRecipient.isPushGroup &&
!conversationRecipient.isRegistered &&
!conversationRecipient.isReleaseNotes
}