mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-21 19:28:27 +08:00
tweaks (#1806)
* opt: nonnull case * fix: ImageGrid * opt: distanceSquared
This commit is contained in:
committed by
GitHub
parent
4eae7e698f
commit
923af32c96
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user