mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-23 04:00:28 +08:00
@@ -28,18 +28,19 @@ class SpaceSettingController
|
||||
UserHttp.spaceSetting();
|
||||
|
||||
Future<void> onMod() async {
|
||||
if ((hasMod ?? false) && loadingState.value.isSuccess) {
|
||||
Privacy? data = loadingState.value.data;
|
||||
if (data != null) {
|
||||
final res = await UserHttp.spaceSettingMod(
|
||||
{
|
||||
for (final e in data.list1) e.key: e.value,
|
||||
for (final e in data.list2) e.key: e.value,
|
||||
for (final e in data.list3) e.key: e.value,
|
||||
},
|
||||
);
|
||||
if (!res.isSuccess) {
|
||||
res.toast();
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user