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