mod: 自定义toast样式、详情页样式修改
This commit is contained in:
@ -22,6 +22,7 @@ class ZanButton extends StatefulWidget {
|
||||
class _ZanButtonState extends State<ZanButton> {
|
||||
// 评论点赞
|
||||
onLikeReply() async {
|
||||
SmartDialog.showLoading(msg: 'pilipala ...');
|
||||
ReplyItemModel replyItem = widget.replyItem!;
|
||||
int oid = replyItem.oid!;
|
||||
int rpid = replyItem.rpid!;
|
||||
@ -29,8 +30,9 @@ class _ZanButtonState extends State<ZanButton> {
|
||||
int action = replyItem.action == 0 ? 1 : 0;
|
||||
var res = await ReplyHttp.likeReply(
|
||||
type: widget.replyType!.index, oid: oid, rpid: rpid, action: action);
|
||||
SmartDialog.dismiss();
|
||||
if (res['status']) {
|
||||
SmartDialog.showToast(replyItem.action == 0 ? '点赞成功' : '取消赞');
|
||||
SmartDialog.showToast(replyItem.action == 0 ? '点赞成功 👍' : '取消赞 💔');
|
||||
if (action == 1) {
|
||||
replyItem.like = replyItem.like! + 1;
|
||||
replyItem.action = 1;
|
||||
|
Reference in New Issue
Block a user