mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 18:00:02 +01:00
Refactor RecipientTable with a PNI constraint.
This commit is contained in:
@@ -69,10 +69,10 @@ class InternalSearchViewModel : ViewModel() {
|
||||
|
||||
private fun RecipientRecord.displayName(): String {
|
||||
return when {
|
||||
this.groupType == RecipientTable.GroupType.SIGNAL_V1 -> "GV1::${this.groupId}"
|
||||
this.groupType == RecipientTable.GroupType.SIGNAL_V2 -> "GV2::${this.groupId}"
|
||||
this.groupType == RecipientTable.GroupType.MMS -> "MMS_GROUP::${this.groupId}"
|
||||
this.groupType == RecipientTable.GroupType.DISTRIBUTION_LIST -> "DLIST::${this.distributionListId}"
|
||||
this.recipientType == RecipientTable.RecipientType.GV1 -> "GV1::${this.groupId}"
|
||||
this.recipientType == RecipientTable.RecipientType.GV2 -> "GV2::${this.groupId}"
|
||||
this.recipientType == RecipientTable.RecipientType.MMS -> "MMS_GROUP::${this.groupId}"
|
||||
this.recipientType == RecipientTable.RecipientType.DISTRIBUTION_LIST -> "DLIST::${this.distributionListId}"
|
||||
this.systemDisplayName?.isNotBlank() == true -> this.systemDisplayName
|
||||
this.signalProfileName.toString().isNotBlank() -> this.signalProfileName.serialize()
|
||||
this.e164 != null -> this.e164
|
||||
|
||||
Reference in New Issue
Block a user