From 515402f48990d5a19082bcea761dfbb291cb3411 Mon Sep 17 00:00:00 2001 From: greta Date: Tue, 10 Sep 2024 14:41:08 +0200 Subject: [PATCH] fixup! feat: add recipient info on the right side of the composer Signed-off-by: greta --- src/nextcloud-contacts/RecipientDetails.vue | 8 ++++---- src/store/getters.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/nextcloud-contacts/RecipientDetails.vue b/src/nextcloud-contacts/RecipientDetails.vue index 809f6c7bd6..385d873d3b 100644 --- a/src/nextcloud-contacts/RecipientDetails.vue +++ b/src/nextcloud-contacts/RecipientDetails.vue @@ -120,7 +120,7 @@ export default { data() { return { - loadingData: true, + loadingData: false, loadingUpdate: false, // if true, the local contact have been fixed and requires a push fixed: false, @@ -132,6 +132,7 @@ export default { showMenuPopover: false, profileEnabled, localContact: undefined, + addressbooks: [], } }, @@ -183,7 +184,6 @@ export default { }, {}) }, - /** * Fake model to use the propertySelect component * @@ -248,6 +248,7 @@ export default { contact(contact) { this.updateLocalContact(contact) }, + immediate: true, }, methods: { updateGroups(value) { @@ -281,13 +282,12 @@ export default { */ async updateLocalContact(contact) { // create empty contact and copy inner data + // this.fixed = validate(localContact) const localContact = Object.assign( Object.create(Object.getPrototypeOf(contact)), contact, ) - // this.fixed = validate(localContact) - this.localContact = localContact this.newGroupsValue = [...this.localContact.groups] }, diff --git a/src/store/getters.js b/src/store/getters.js index 76c9ea97f2..deb177a796 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -123,8 +123,6 @@ export const getters = { getClonedWriteableCalendars: (state) => state.calendars.filter(calendar => { return calendar.isWriteable() }).map(calendar => { - getAddressBooks: (state) => state.addressBooks, - getClonedCalendars: (state) => state.calendars.map(calendar => { // Hack: We need to clone all calendars because some methods (e.g. calendarQuery) are // unnecessarily mutating the object and causing vue warnings (if used outside of // mutations). @@ -161,4 +159,6 @@ export const getters = { isFollowUpFeatureAvailable: (state) => state.followUpFeatureAvailable, getInternalAddresses: (state) => state.internalAddress?.filter(internalAddress => internalAddress !== undefined), hasCurrentUserPrincipalAndCollections: (state) => state.hasCurrentUserPrincipalAndCollections, + showSettingsForAccount: (state) => (accountId) => state.showAccountSettings === accountId, + getAddressBooks: (state) => state.addressBooks, }