mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-23 19:26:17 +00:00
Remove inset for check circle and update copy for private and group story pickers.
This commit is contained in:
@@ -93,7 +93,13 @@ object ContactSearchItems {
|
||||
model.story.viewerCount
|
||||
}
|
||||
|
||||
number.text = context.resources.getQuantityString(R.plurals.SelectViewersFragment__d_viewers, count, count)
|
||||
val pluralId = when {
|
||||
model.story.recipient.isGroup -> R.plurals.ContactSearchItems__group_story_d_viewers
|
||||
model.story.recipient.isMyStory -> R.plurals.SelectViewersFragment__d_viewers
|
||||
else -> R.plurals.ContactSearchItems__private_story_d_viewers
|
||||
}
|
||||
|
||||
number.text = context.resources.getQuantityString(pluralId, count, count)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,8 +165,15 @@ object ContactSearchItems {
|
||||
protected open fun bindNumberField(model: T) {
|
||||
number.visible = getRecipient(model).isGroup
|
||||
if (getRecipient(model).isGroup) {
|
||||
val members = getRecipient(model).participants.size
|
||||
number.text = context.resources.getQuantityString(R.plurals.ContactSelectionListFragment_d_members, members, members)
|
||||
number.text = getRecipient(model).participants
|
||||
.take(10)
|
||||
.sortedWith(IsSelfComparator()).joinToString(", ") {
|
||||
if (it.isSelf) {
|
||||
context.getString(R.string.ConversationTitleView_you)
|
||||
} else {
|
||||
it.getShortDisplayName(context)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,4 +259,13 @@ object ContactSearchItems {
|
||||
itemView.setOnClickListener { expandListener.invoke(model.expand) }
|
||||
}
|
||||
}
|
||||
|
||||
private class IsSelfComparator : Comparator<Recipient> {
|
||||
override fun compare(lhs: Recipient?, rhs: Recipient?): Int {
|
||||
val isLeftSelf = lhs?.isSelf == true
|
||||
val isRightSelf = rhs?.isSelf == true
|
||||
|
||||
return if (isLeftSelf == isRightSelf) 0 else if (isLeftSelf) 1 else -1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@color/core_ultramarine" />
|
||||
<stroke android:width="2dp" android:color="@color/signal_background_primary" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:drawable="@drawable/ic_check_outline_22" />
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@color/core_ultramarine" />
|
||||
<stroke android:width="2dp" android:color="@color/signal_background_dialog" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:drawable="@drawable/ic_check_outline_22" />
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@color/core_ultramarine" />
|
||||
<stroke android:width="2dp" android:color="@color/white" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:drawable="@drawable/ic_check_outline_22" />
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@color/core_ultramarine" />
|
||||
<stroke android:width="2dp" android:color="@color/white" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:drawable="@drawable/ic_check_outline_22" />
|
||||
|
||||
@@ -4774,6 +4774,16 @@
|
||||
<string name="ExpiredGiftSheetConfiguration__make_a_monthly_donation">Make a monthly donation</string>
|
||||
<!-- Expired gift sheet not now button -->
|
||||
<string name="ExpiredGiftSheetConfiguration__not_now">Not now</string>
|
||||
<!-- Label under name for private stories -->
|
||||
<plurals name="ContactSearchItems__private_story_d_viewers">
|
||||
<item quantity="one">Private Story · %1$d viewer</item>
|
||||
<item quantity="other">Private Story · %1$d viewers</item>
|
||||
</plurals>
|
||||
<!-- Label under name for group stories -->
|
||||
<plurals name="ContactSearchItems__group_story_d_viewers">
|
||||
<item quantity="one">Group Story · %1$d viewer</item>
|
||||
<item quantity="other">Group Story · %1$d viewers</item>
|
||||
</plurals>
|
||||
|
||||
<!-- EOF -->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user