* opt: nonnull case

* fix: ImageGrid

* opt: distanceSquared
This commit is contained in:
My-Responsitories
2026-01-21 13:34:44 +08:00
committed by GitHub
parent 4eae7e698f
commit 923af32c96
6 changed files with 138 additions and 164 deletions

View File

@@ -29,18 +29,16 @@ class SpaceSettingController
Future<void> onMod() async {
if (hasMod ?? false) {
if (loadingState.value case Success(:final response)) {
if (response != null) {
final res = await UserHttp.spaceSettingMod(
{
for (final e in response.list1) e.key: e.value,
for (final e in response.list2) e.key: e.value,
for (final e in response.list3) e.key: e.value,
},
);
if (!res.isSuccess) {
res.toast();
}
if (loadingState.value case Success(:final response?)) {
final res = await UserHttp.spaceSettingMod(
{
for (final e in response.list1) e.key: e.value,
for (final e in response.list2) e.key: e.value,
for (final e in response.list3) e.key: e.value,
},
);
if (!res.isSuccess) {
res.toast();
}
}
}