Change error prompts

This commit is contained in:
problematicconsumer
2023-08-26 17:01:51 +03:30
parent f393020a31
commit 2ecb781f60
15 changed files with 88 additions and 48 deletions

View File

@@ -31,7 +31,7 @@ class ProfileTile extends HookConsumerWidget {
final selectActiveMutation = useMutation(
initialOnFailure: (err) {
CustomToast.error(t.presentError(err)).show(context);
CustomToast.error(t.printError(err)).show(context);
},
);
@@ -146,7 +146,8 @@ class ProfileActionButton extends HookConsumerWidget {
final updateProfileMutation = useMutation(
initialOnFailure: (err) {
CustomToast.error(t.presentError(err)).show(context);
// CustomToast.error(t.printError(err)).show(context);
CustomAlertDialog.fromErr(t.presentError(err)).show(context);
},
initialOnSuccess: () =>
CustomToast.success(t.profile.update.successMsg).show(context),
@@ -204,14 +205,14 @@ class ProfileActionsMenu extends HookConsumerWidget {
final updateProfileMutation = useMutation(
initialOnFailure: (err) {
CustomToast.error(t.presentError(err)).show(context);
CustomAlertDialog.fromErr(t.presentError(err)).show(context);
},
initialOnSuccess: () =>
CustomToast.success(t.profile.update.successMsg).show(context),
);
final deleteProfileMutation = useMutation(
initialOnFailure: (err) {
CustomToast.error(t.presentError(err)).show(context);
CustomAlertDialog.fromErr(t.presentError(err)).show(context);
},
);