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

@@ -951,11 +951,11 @@ class ReplyItemGrpc extends StatelessWidget {
rpid: item.id.toInt(),
);
SmartDialog.dismiss();
if (result['status']) {
if (result.isSuccess) {
SmartDialog.showToast('删除成功');
onDelete();
} else {
SmartDialog.showToast('删除失败, ${result["msg"]}');
SmartDialog.showToast('删除失败, $result');
}
},
minLeadingWidth: 0,

View File

@@ -39,7 +39,7 @@ class ZanButtonGrpc extends StatelessWidget {
rpid: rpid,
);
// SmartDialog.dismiss();
if (res['status']) {
if (res.isSuccess) {
SmartDialog.showToast(isDislike ? '取消踩' : '点踩成功');
if (action == 2) {
if (isLike) replyItem.like -= $fixnum.Int64.ONE;
@@ -51,7 +51,7 @@ class ZanButtonGrpc extends StatelessWidget {
(context as Element?)?.markNeedsBuild();
}
} else {
SmartDialog.showToast(res['msg']);
res.toast();
}
onDone();
}
@@ -79,7 +79,7 @@ class ZanButtonGrpc extends StatelessWidget {
rpid: rpid,
action: action,
);
if (res['status']) {
if (res.isSuccess) {
SmartDialog.showToast(isLike ? '取消赞' : '点赞成功');
if (action == 1) {
replyItem
@@ -94,7 +94,7 @@ class ZanButtonGrpc extends StatelessWidget {
(context as Element?)?.markNeedsBuild();
}
} else {
SmartDialog.showToast(res['msg']);
res.toast();
}
onDone();
}