feat(notes): add feedback messages for note update actions
This commit is contained in:
parent
fb28439d69
commit
1ad880a021
@ -63,6 +63,11 @@ class NotesController extends GetxController {
|
|||||||
|
|
||||||
if (oldNote != null && oldNote.note.trim() == updatedNote.note.trim()) {
|
if (oldNote != null && oldNote.note.trim() == updatedNote.note.trim()) {
|
||||||
logSafe("No changes detected in note. id: ${updatedNote.id}");
|
logSafe("No changes detected in note. id: ${updatedNote.id}");
|
||||||
|
showAppSnackbar(
|
||||||
|
title: "No Changes",
|
||||||
|
message: "No changes were made to the note.",
|
||||||
|
type: SnackbarType.info,
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,6 +84,11 @@ class NotesController extends GetxController {
|
|||||||
notesList[index] = updatedNote;
|
notesList[index] = updatedNote;
|
||||||
notesList.refresh();
|
notesList.refresh();
|
||||||
}
|
}
|
||||||
|
showAppSnackbar(
|
||||||
|
title: "Success",
|
||||||
|
message: "Note updated successfully.",
|
||||||
|
type: SnackbarType.success,
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
showAppSnackbar(
|
showAppSnackbar(
|
||||||
title: "Error",
|
title: "Error",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user