Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-12-27 20:54:41 +08:00
parent 25acf3a9bb
commit b51c646415
227 changed files with 768 additions and 764 deletions

View File

@@ -76,7 +76,7 @@ class PgcIntroController extends CommonIntroController {
// 获取点赞/投币/收藏状态
Future<void> queryPgcLikeCoinFav() async {
var result = await VideoHttp.pgcLikeCoinFav(epId: epId!);
final result = await VideoHttp.pgcLikeCoinFav(epId: epId!);
if (result case Success(:final response)) {
final hasLike = response.like == 1;
final hasFav = response.favorite == 1;
@@ -103,7 +103,7 @@ class PgcIntroController extends CommonIntroController {
return;
}
final newVal = !hasLike.value;
var result = await VideoHttp.likeVideo(bvid: bvid, type: newVal);
final result = await VideoHttp.likeVideo(bvid: bvid, type: newVal);
if (result case Success(:final response)) {
SmartDialog.showToast(newVal ? response : '取消赞');
pgcItem.stat?.like += newVal ? 1 : -1;
@@ -332,7 +332,7 @@ class PgcIntroController extends CommonIntroController {
// 追番
Future<void> pgcAdd() async {
var result = await VideoHttp.pgcAdd(seasonId: pgcItem.seasonId);
final result = await VideoHttp.pgcAdd(seasonId: pgcItem.seasonId);
if (result case Success(:final response)) {
isFollowed.value = true;
followStatus.value = 2;
@@ -344,7 +344,7 @@ class PgcIntroController extends CommonIntroController {
// 取消追番
Future<void> pgcDel() async {
var result = await VideoHttp.pgcDel(seasonId: pgcItem.seasonId);
final result = await VideoHttp.pgcDel(seasonId: pgcItem.seasonId);
if (result case Success(:final response)) {
isFollowed.value = false;
SmartDialog.showToast(response);
@@ -354,7 +354,7 @@ class PgcIntroController extends CommonIntroController {
}
Future<void> pgcUpdate(int status) async {
var result = await VideoHttp.pgcUpdate(
final result = await VideoHttp.pgcUpdate(
seasonId: pgcItem.seasonId.toString(),
status: status,
);
@@ -427,7 +427,7 @@ class PgcIntroController extends CommonIntroController {
SmartDialog.showToast('已三连');
return;
}
var result = await VideoHttp.pgcTriple(epId: epId!, seasonId: seasonId);
final result = await VideoHttp.pgcTriple(epId: epId!, seasonId: seasonId);
if (result case Success(:final response)) {
late final stat = pgcItem.stat;
if (response.like == 1 && !hasLike.value) {
@@ -455,7 +455,7 @@ class PgcIntroController extends CommonIntroController {
Future<void> queryIsFollowed() async {
// try {
// var result = await Request().get(
// final result = await Request().get(
// 'https://www.bilibili.com/bangumi/play/ss$seasonId',
// );
// dom.Document document = html_parser.parse(result.data);
@@ -473,7 +473,7 @@ class PgcIntroController extends CommonIntroController {
// ViewGrpc.view(bvid: bvid).then((res) {
// if (res.isSuccess) {
// ViewPgcAny view = ViewPgcAny.fromBuffer(res.data.supplement.value);
// var userStatus = view.ogvData.userStatus;
// final userStatus = view.ogvData.userStatus;
// isFollowed.value = userStatus.follow == 1;
// followStatus.value = userStatus.followStatus;
// }