Skip to content

Commit

Permalink
fixup! feat: add recipient info on the right side of the composer
Browse files Browse the repository at this point in the history
Signed-off-by: greta <[email protected]>
  • Loading branch information
GretaD committed Sep 10, 2024
1 parent df6a7dc commit 7a1d576
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions src/nextcloud-contacts/RecipientDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ export default {
* @return {Array}
*/
sortedProperties() {
if (!this.localContact || !this.localContact.properties) {
return []
}
return this.localContact.properties
.slice(0)
.sort((a, b) => {
Expand All @@ -165,23 +168,22 @@ export default {
* @return {object}
*/
groupedProperties() {
return this.sortedProperties
.reduce((list, property) => {
// If there is no component to display this prop, ignore it
if (!this.canDisplay(property)) {
return list
}
// Init if needed
if (!list[property.name]) {
list[property.name] = []
}
list[property.name].push(property)
if (!this.sortedProperties) {
return {}
}
return this.sortedProperties.reduce((list, property) => {
if (!this.canDisplay(property)) {
return list
}, {})
}
if (!list[property.name]) {
list[property.name] = []
}
list[property.name].push(property)
return list
}, {})
},
/**
* Fake model to use the propertySelect component
*
Expand Down

0 comments on commit 7a1d576

Please sign in to comment.