feat(comment): add feedback messages for comment update actions
This commit is contained in:
parent
2fef2e508e
commit
fb28439d69
@ -54,6 +54,11 @@ class DirectoryController extends GetxController {
|
|||||||
|
|
||||||
if (oldComment != null && oldComment.note.trim() == comment.note.trim()) {
|
if (oldComment != null && oldComment.note.trim() == comment.note.trim()) {
|
||||||
logSafe("No changes detected in comment. id: ${comment.id}");
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,6 +71,13 @@ class DirectoryController extends GetxController {
|
|||||||
if (success) {
|
if (success) {
|
||||||
logSafe("Comment updated successfully. id: ${comment.id}");
|
logSafe("Comment updated successfully. id: ${comment.id}");
|
||||||
await fetchCommentsForContact(comment.contactId);
|
await fetchCommentsForContact(comment.contactId);
|
||||||
|
|
||||||
|
// ✅ Show success message
|
||||||
|
showAppSnackbar(
|
||||||
|
title: "Success",
|
||||||
|
message: "Comment updated successfully.",
|
||||||
|
type: SnackbarType.success,
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
logSafe("Failed to update comment via API. id: ${comment.id}");
|
logSafe("Failed to update comment via API. id: ${comment.id}");
|
||||||
showAppSnackbar(
|
showAppSnackbar(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user