mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt handle data
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -35,8 +35,9 @@ class FollowChildController
|
||||
tagid == null &&
|
||||
isRefresh &&
|
||||
controller!.followState.value.isSuccess) {
|
||||
controller!.tabs[0].count = response.response.total;
|
||||
controller!.tabs.refresh();
|
||||
controller!.tabs
|
||||
..[0].count = response.response.total
|
||||
..refresh();
|
||||
}
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
@@ -94,10 +94,9 @@ class _FollowChildPageState extends State<FollowChildPage>
|
||||
isOwner: widget.controller?.isOwner,
|
||||
onSelect: widget.onSelect,
|
||||
callback: (attr) {
|
||||
List<FollowItemModel> list =
|
||||
_followController.loadingState.value.data!;
|
||||
list[index].attribute = attr == 0 ? -1 : 0;
|
||||
_followController.loadingState.refresh();
|
||||
_followController.loadingState
|
||||
..value.data![index].attribute = attr == 0 ? -1 : 0
|
||||
..refresh();
|
||||
},
|
||||
);
|
||||
},
|
||||
|
||||
@@ -73,8 +73,9 @@ class FollowController extends GetxController with GetTickerProviderStateMixin {
|
||||
Future<void> onUpdateTag(int index, tagid, String tagName) async {
|
||||
final res = await MemberHttp.updateFollowTag(tagid, tagName);
|
||||
if (res['status']) {
|
||||
tabs[index].name = tagName;
|
||||
tabs.refresh();
|
||||
tabs
|
||||
..[index].name = tagName
|
||||
..refresh();
|
||||
SmartDialog.showToast('修改成功');
|
||||
} else {
|
||||
SmartDialog.showToast(res['msg']);
|
||||
|
||||
Reference in New Issue
Block a user