diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2021-09-15 15:59:57 +0300 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2021-09-15 16:38:49 +0300 |
commit | 5897029fa27a181094543ac3eb23ad29964937de (patch) | |
tree | 6e0fda6d008143e52a5fd46641e27f9ef6494b48 /apps | |
parent | b22628f9e6dc06b02ffd02bc7322df1998f67ad6 (diff) |
fix updating and thus UI rendering on update notification change
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/settings/src/components/PersonalInfo/EmailSection/Email.vue | 11 | ||||
-rw-r--r-- | apps/settings/src/components/PersonalInfo/EmailSection/EmailSection.vue | 4 |
2 files changed, 10 insertions, 5 deletions
diff --git a/apps/settings/src/components/PersonalInfo/EmailSection/Email.vue b/apps/settings/src/components/PersonalInfo/EmailSection/Email.vue index d3d700ca16b..5c7b551d072 100644 --- a/apps/settings/src/components/PersonalInfo/EmailSection/Email.vue +++ b/apps/settings/src/components/PersonalInfo/EmailSection/Email.vue @@ -146,8 +146,6 @@ export default { saveAdditionalEmailScope, showCheckmarkIcon: false, showErrorIcon: false, - isNotificationEmail: (this.email === this.activeNotificationEmail) - || (this.primary && this.activeNotificationEmail === ''), } }, @@ -200,6 +198,11 @@ export default { } return t('settings', 'Additional email address {index}', { index: this.index + 1 }) }, + + isNotificationEmail() { + return (this.email === this.activeNotificationEmail) + || (this.primary && this.activeNotificationEmail === '') + }, }, mounted() { @@ -335,8 +338,8 @@ export default { // Ensure that local state reflects server state if (email) { this.initialEmail = email - } else if (notificationEmail) { - this.activeNotificationEmail = notificationEmail + } else if (notificationEmail !== undefined) { + this.$emit('update:notification-email', notificationEmail) } this.showCheckmarkIcon = true setTimeout(() => { this.showCheckmarkIcon = false }, 2000) diff --git a/apps/settings/src/components/PersonalInfo/EmailSection/EmailSection.vue b/apps/settings/src/components/PersonalInfo/EmailSection/EmailSection.vue index 8424dee774e..884d44f14c0 100644 --- a/apps/settings/src/components/PersonalInfo/EmailSection/EmailSection.vue +++ b/apps/settings/src/components/PersonalInfo/EmailSection/EmailSection.vue @@ -37,7 +37,8 @@ :scope.sync="primaryEmail.scope" :email.sync="primaryEmail.value" :active-notification-email.sync="notificationEmail" - @update:email="onUpdateEmail" /> + @update:email="onUpdateEmail" + @update:notification-email="onUpdateNotificationEmail" /> </template> <span v-else> {{ primaryEmail.value || t('settings', 'No email address set') }} @@ -50,6 +51,7 @@ :local-verification-state="parseInt(additionalEmail.locallyVerified, 10)" :active-notification-email.sync="notificationEmail" @update:email="onUpdateEmail" + @update:notification-email="onUpdateNotificationEmail" @delete-additional-email="onDeleteAdditionalEmail(index)" /> </section> </template> |