From fb28439d69da4b1714d13a0a76464ac57dafcc2b Mon Sep 17 00:00:00 2001 From: Vaibhav Surve Date: Tue, 8 Jul 2025 15:32:20 +0530 Subject: [PATCH] feat(comment): add feedback messages for comment update actions --- lib/controller/directory/directory_controller.dart | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/controller/directory/directory_controller.dart b/lib/controller/directory/directory_controller.dart index 86e9be9..9e70d51 100644 --- a/lib/controller/directory/directory_controller.dart +++ b/lib/controller/directory/directory_controller.dart @@ -54,6 +54,11 @@ class DirectoryController extends GetxController { if (oldComment != null && oldComment.note.trim() == comment.note.trim()) { logSafe("No changes detected in comment. id: ${comment.id}"); + showAppSnackbar( + title: "No Changes", + message: "No changes were made to the comment.", + type: SnackbarType.info, + ); return; } @@ -66,6 +71,13 @@ class DirectoryController extends GetxController { if (success) { logSafe("Comment updated successfully. id: ${comment.id}"); await fetchCommentsForContact(comment.contactId); + + // ✅ Show success message + showAppSnackbar( + title: "Success", + message: "Comment updated successfully.", + type: SnackbarType.success, + ); } else { logSafe("Failed to update comment via API. id: ${comment.id}"); showAppSnackbar(