mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 20:48:43 +00:00
Fix multi-invite group create dialog.
This commit is contained in:
committed by
Alex Hart
parent
e1067e30de
commit
e18e4454e4
@@ -16,6 +16,7 @@ import org.thoughtcrime.securesms.glide.GiftBadgeModel
|
|||||||
import org.thoughtcrime.securesms.recipients.Recipient
|
import org.thoughtcrime.securesms.recipients.Recipient
|
||||||
import org.thoughtcrime.securesms.util.ScreenDensity
|
import org.thoughtcrime.securesms.util.ScreenDensity
|
||||||
import org.thoughtcrime.securesms.util.ThemeUtil
|
import org.thoughtcrime.securesms.util.ThemeUtil
|
||||||
|
import org.thoughtcrime.securesms.util.visible
|
||||||
|
|
||||||
class BadgeImageView @JvmOverloads constructor(
|
class BadgeImageView @JvmOverloads constructor(
|
||||||
context: Context,
|
context: Context,
|
||||||
@@ -99,6 +100,10 @@ class BadgeImageView @JvmOverloads constructor(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun isShowingBadge(): Boolean {
|
||||||
|
return drawable != null
|
||||||
|
}
|
||||||
|
|
||||||
private fun clearDrawable() {
|
private fun clearDrawable() {
|
||||||
if (drawable != null) {
|
if (drawable != null) {
|
||||||
setImageDrawable(null)
|
setImageDrawable(null)
|
||||||
|
|||||||
@@ -257,6 +257,7 @@ final class GroupMemberListAdapter extends RecyclerView.Adapter<GroupMemberListA
|
|||||||
if (this.badge != null) {
|
if (this.badge != null) {
|
||||||
this.badge.setBadgeFromRecipient(recipient);
|
this.badge.setBadgeFromRecipient(recipient);
|
||||||
this.badge.setClickable(false);
|
this.badge.setClickable(false);
|
||||||
|
this.badge.setVisibility(this.badge.isShowingBadge() ? View.VISIBLE : View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.about != null) {
|
if (this.about != null) {
|
||||||
|
|||||||
@@ -31,9 +31,6 @@ public final class GroupInviteSentDialog {
|
|||||||
|
|
||||||
AlertDialog.Builder builder = new MaterialAlertDialogBuilder(context)
|
AlertDialog.Builder builder = new MaterialAlertDialogBuilder(context)
|
||||||
.setTitle(context.getResources().getQuantityString(R.plurals.GroupManagement_invitation_sent, size, size))
|
.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);
|
.setPositiveButton(android.R.string.ok, null);
|
||||||
if (size == 1) {
|
if (size == 1) {
|
||||||
builder.setMessage(context.getString(R.string.GroupManagement_invite_single_user, recipients.get(0).getDisplayNameOrUsername(context)));
|
builder.setMessage(context.getString(R.string.GroupManagement_invite_single_user, recipients.get(0).getDisplayNameOrUsername(context)));
|
||||||
|
|||||||
Reference in New Issue
Block a user