feat: 稍后再看添加/清除已看

This commit is contained in:
guozhigq
2023-08-05 22:24:03 +08:00
parent 6b0adbc3e1
commit 1676f6f473
6 changed files with 107 additions and 3 deletions

View File

@ -1,8 +1,10 @@
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
import 'package:flutter/material.dart';
import 'package:pilipala/common/constants.dart';
import 'package:pilipala/common/widgets/stat/danmu.dart';
import 'package:pilipala/common/widgets/stat/view.dart';
import 'package:pilipala/http/user.dart';
import 'package:pilipala/pages/rcmd/index.dart';
import 'package:pilipala/utils/id_utils.dart';
import 'package:pilipala/utils/utils.dart';
@ -43,6 +45,11 @@ class VideoCardV extends StatelessWidget {
longPressEnd!();
}
},
// 双击 稍后再看
onDoubleTap: () async {
var res = await UserHttp.toViewLater(bvid: videoItem.bvid);
SmartDialog.showToast(res['msg']);
},
child: InkWell(
onTap: () async {
String bvid = videoItem.bvid ?? IdUtils.av2bv(videoItem.aid);