Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-06-21 22:38:47 +08:00
parent a1555826c3
commit 17568c8c27
43 changed files with 818 additions and 932 deletions

View File

@@ -100,14 +100,14 @@ class _FollowChildPageState extends State<FollowChildPage>
if (index == response.length - 1) {
_followController.onLoadMore();
}
final item = response[index];
return FollowItem(
item: response[index],
item: item,
isOwner: widget.controller?.isOwner,
onSelect: widget.onSelect,
callback: (attr) {
_followController.loadingState
..value.data![index].attribute = attr == 0 ? -1 : 0
..refresh();
item.attribute = attr == 0 ? -1 : 0;
_followController.loadingState.refresh();
},
);
},

View File

@@ -70,12 +70,11 @@ class FollowController extends GetxController with GetTickerProviderStateMixin {
}
}
Future<void> onUpdateTag(int index, tagid, String tagName) async {
final res = await MemberHttp.updateFollowTag(tagid, tagName);
Future<void> onUpdateTag(MemberTagItemModel item, String tagName) async {
final res = await MemberHttp.updateFollowTag(item.tagid, tagName);
if (res['status']) {
tabs
..[index].name = tagName
..refresh();
item.name = tagName;
tabs.refresh();
SmartDialog.showToast('修改成功');
} else {
SmartDialog.showToast(res['msg']);

View File

@@ -179,8 +179,7 @@ class _FollowPageState extends State<FollowPage> {
),
onConfirm: () {
if (tagName.isNotEmpty) {
_followController.onUpdateTag(
index, item.tagid, tagName);
_followController.onUpdateTag(item, tagName);
}
},
);