Refactor RecipientTable with a PNI constraint.

This commit is contained in:
Greyson Parrelli
2023-08-02 15:13:35 -04:00
parent 67b8f468e4
commit 5f289fa400
19 changed files with 411 additions and 223 deletions

View File

@@ -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