view later (#419)

This commit is contained in:
My-Responsitories
2025-03-10 18:46:07 +08:00
committed by GitHub
parent 59797a2f5f
commit 99cdec62a1
4 changed files with 24 additions and 29 deletions

View File

@@ -59,6 +59,8 @@ class VideoIntroController extends GetxController
RxBool hasCoin = false.obs;
// 是否收藏
RxBool hasFav = false.obs;
// 是否稍后再看
RxBool hasLater = false.obs;
bool isLogin = false;
Rx<FavFolderData> favFolderData = FavFolderData().obs;
List? favIds;
@@ -308,6 +310,14 @@ class VideoIntroController extends GetxController
}
}
Future viewLater() async {
var res = await (hasLater.value
? UserHttp.toViewDel(aids: [IdUtils.bv2av(bvid)])
: await UserHttp.toViewLater(bvid: bvid));
if (res['status']) hasLater.value = !hasLater.value;
SmartDialog.showToast(res['msg']);
}
void coinVideo(int coin, [bool selectLike = false]) async {
if (videoDetail.value.stat?.coin == null) {
// not init