From 2dfae0425e2dad385385ddd3891f3a7329c5b2d7 Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Mon, 21 Jul 2025 21:30:53 +0800 Subject: [PATCH] Revert "Enhance handleContactVisibility to return both title and message" This reverts commit 97cb5a0ac6ad22832e8af55e9132cd8967cd3ceb. --- src/views/ContactsView.vue | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) 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; } }