opt: LoadingState (#1776)

This commit is contained in:
My-Responsitories
2025-12-13 12:43:32 +08:00
committed by GitHub
parent 3741fe54ff
commit 17883eb77e
82 changed files with 832 additions and 887 deletions

View File

@@ -69,34 +69,34 @@ class FollowController extends GetxController with GetTickerProviderStateMixin {
Future<void> onCreateTag(String tagName) async {
final res = await MemberHttp.createFollowTag(tagName);
if (res['status']) {
if (res.isSuccess) {
followState.value = LoadingState.loading();
queryFollowUpTags();
SmartDialog.showToast('创建成功');
} else {
SmartDialog.showToast(res['msg']);
res.toast();
}
}
Future<void> onUpdateTag(MemberTagItemModel item, String tagName) async {
final res = await MemberHttp.updateFollowTag(item.tagid, tagName);
if (res['status']) {
final res = await MemberHttp.updateFollowTag(item.tagid!, tagName);
if (res.isSuccess) {
item.name = tagName;
tabs.refresh();
SmartDialog.showToast('修改成功');
} else {
SmartDialog.showToast(res['msg']);
res.toast();
}
}
Future<void> onDelTag(int? tagid) async {
Future<void> onDelTag(int tagid) async {
final res = await MemberHttp.delFollowTag(tagid);
if (res['status']) {
if (res.isSuccess) {
followState.value = LoadingState.loading();
queryFollowUpTags();
SmartDialog.showToast('删除成功');
} else {
SmartDialog.showToast(res['msg']);
res.toast();
}
}
}