🐛 Dozens of bug fixes

This commit is contained in:
2025-08-24 21:49:40 +08:00
parent 4fdc8eb1d0
commit abf395ff9a
6 changed files with 116 additions and 1202 deletions

View File

@@ -297,16 +297,24 @@ class EditAppScreen extends HookConsumerWidget {
}
: null,
};
if (isNew) {
await client.post(
'/develop/developers/$publisherName/projects/$projectId/apps',
data: data,
);
} else {
await client.patch(
'/develop/developers/$publisherName/projects/$projectId/apps/$id',
data: data,
);
try {
showLoadingModal(context);
if (isNew) {
await client.post(
'/develop/developers/$publisherName/projects/$projectId/apps',
data: data,
);
} else {
await client.patch(
'/develop/developers/$publisherName/projects/$projectId/apps/$id',
data: data,
);
}
} catch (err) {
showErrorAlert(err);
return;
} finally {
if (context.mounted) hideLoadingModal(context);
}
ref.invalidate(customAppsProvider(publisherName, projectId));
if (context.mounted) {