Fix multi-invite group create dialog.

This commit is contained in:
Cody Henthorne
2024-02-27 09:45:39 -05:00
committed by Alex Hart
parent e1067e30de
commit e18e4454e4
3 changed files with 6 additions and 3 deletions

View File

@@ -16,6 +16,7 @@ import org.thoughtcrime.securesms.glide.GiftBadgeModel
import org.thoughtcrime.securesms.recipients.Recipient
import org.thoughtcrime.securesms.util.ScreenDensity
import org.thoughtcrime.securesms.util.ThemeUtil
import org.thoughtcrime.securesms.util.visible
class BadgeImageView @JvmOverloads constructor(
context: Context,
@@ -99,6 +100,10 @@ class BadgeImageView @JvmOverloads constructor(
}
}
fun isShowingBadge(): Boolean {
return drawable != null
}
private fun clearDrawable() {
if (drawable != null) {
setImageDrawable(null)

View File

@@ -257,6 +257,7 @@ final class GroupMemberListAdapter extends RecyclerView.Adapter<GroupMemberListA
if (this.badge != null) {
this.badge.setBadgeFromRecipient(recipient);
this.badge.setClickable(false);
this.badge.setVisibility(this.badge.isShowingBadge() ? View.VISIBLE : View.GONE);
}
if (this.about != null) {

View File

@@ -31,9 +31,6 @@ public final class GroupInviteSentDialog {
AlertDialog.Builder builder = new MaterialAlertDialogBuilder(context)
.setTitle(context.getResources().getQuantityString(R.plurals.GroupManagement_invitation_sent, size, size))
// TODO: GV2 Need a URL for learn more
// .setNegativeButton(R.string.GroupManagement_learn_more, (dialog, which) -> {
// })
.setPositiveButton(android.R.string.ok, null);
if (size == 1) {
builder.setMessage(context.getString(R.string.GroupManagement_invite_single_user, recipients.get(0).getDisplayNameOrUsername(context)));