diff --git a/src/views/ContactsView.vue b/src/views/ContactsView.vue index c1c87e97..2066e07e 100644 --- a/src/views/ContactsView.vue +++ b/src/views/ContactsView.vue @@ -770,8 +770,8 @@ export default class ContactsView extends Vue { // Update local contacts list this.updateContactsList(newContact); - // Set visibility and get success notification data - const notificationData = await this.handleContactVisibility(newContact); + // Set visibility and get success message + const addedMessage = await this.handleContactVisibility(newContact); // Clear input field this.contactInput = ""; @@ -779,12 +779,8 @@ export default class ContactsView extends Vue { // Handle registration prompt if needed await this.handleRegistrationPrompt(newContact); - // Show success notification with custom title and message - this.notify.toast( - notificationData.title, - notificationData.message, - TIMEOUTS.STANDARD, - ); + // Show success notification + this.notify.success(addedMessage); } catch (err) { this.handleContactAddError(err); } @@ -817,23 +813,15 @@ export default class ContactsView extends Vue { } /** - * Handle contact visibility settings and return appropriate notification data + * Handle contact visibility settings and return appropriate message */ - private async handleContactVisibility( - newContact: Contact, - ): Promise<{ title: string; message: string }> { + private async handleContactVisibility(newContact: Contact): Promise { if (this.activeDid) { await this.setVisibility(newContact, true, false); newContact.seesMe = true; - return { - title: NOTIFY_CONTACTS_ADDED_VISIBLE.title, - message: NOTIFY_CONTACTS_ADDED_VISIBLE.message, - }; + return NOTIFY_CONTACTS_ADDED_VISIBLE.message; } else { - return { - title: NOTIFY_CONTACTS_ADDED.title, - message: NOTIFY_CONTACTS_ADDED.message, - }; + return NOTIFY_CONTACTS_ADDED.message; } }