feat(comment): add feedback messages for comment update actions

This commit is contained in:
Vaibhav Surve 2025-07-08 15:32:20 +05:30
parent 2fef2e508e
commit fb28439d69

View File

@ -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(