mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-24 20:35:50 +08:00
@@ -23,6 +23,7 @@ class ZanButtonGrpc extends StatefulWidget {
|
||||
class _ZanButtonGrpcState extends State<ZanButtonGrpc> {
|
||||
Future onHateReply() async {
|
||||
feedBack();
|
||||
// SmartDialog.showLoading(msg: 'piliplus ...');
|
||||
final int oid = widget.replyItem.oid.toInt();
|
||||
final int rpid = widget.replyItem.id.toInt();
|
||||
// 1 已点赞 2 不喜欢 0 未操作
|
||||
@@ -45,6 +46,7 @@ class _ZanButtonGrpcState extends State<ZanButtonGrpc> {
|
||||
}
|
||||
widget.replyItem.replyControl.action = $fixnum.Int64(2);
|
||||
} else {
|
||||
// replyItem.like = replyItem.like! - 1;
|
||||
widget.replyItem.replyControl.action = $fixnum.Int64(0);
|
||||
}
|
||||
setState(() {});
|
||||
@@ -56,6 +58,7 @@ class _ZanButtonGrpcState extends State<ZanButtonGrpc> {
|
||||
// 评论点赞
|
||||
Future onLikeReply() async {
|
||||
feedBack();
|
||||
// SmartDialog.showLoading(msg: 'piliplus ...');
|
||||
final int oid = widget.replyItem.oid.toInt();
|
||||
final int rpid = widget.replyItem.id.toInt();
|
||||
// 1 已点赞 2 不喜欢 0 未操作
|
||||
@@ -67,6 +70,7 @@ class _ZanButtonGrpcState extends State<ZanButtonGrpc> {
|
||||
rpid: rpid,
|
||||
action: action,
|
||||
);
|
||||
// SmartDialog.dismiss();
|
||||
if (res['status']) {
|
||||
SmartDialog.showToast(
|
||||
widget.replyItem.replyControl.action.toInt() != 1 ? '点赞成功' : '取消赞');
|
||||
|
||||
Reference in New Issue
Block a user