fix: zanbtn state

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-13 18:58:31 +08:00
parent 901e8d9cb8
commit 55138957b7

View File

@@ -47,7 +47,9 @@ class _ZanButtonGrpcState extends State<ZanButtonGrpc> {
} else {
widget.replyItem.replyControl.action = $fixnum.Int64.ZERO;
}
setState(() {});
if (mounted) {
setState(() {});
}
} else {
SmartDialog.showToast(res['msg']);
}
@@ -75,7 +77,9 @@ class _ZanButtonGrpcState extends State<ZanButtonGrpc> {
widget.replyItem.like -= $fixnum.Int64.ONE;
widget.replyItem.replyControl.action = $fixnum.Int64.ZERO;
}
setState(() {});
if (mounted) {
setState(() {});
}
} else {
SmartDialog.showToast(res['msg']);
}