mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-22 03:31:09 +08:00
opt: LoadingState (#1776)
This commit is contained in:
committed by
GitHub
parent
3741fe54ff
commit
17883eb77e
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user