Skip to content

Commit

Permalink
fix: 投稿跳转到已失效视频时卡住
Browse files Browse the repository at this point in the history
  • Loading branch information
orz12 committed Aug 25, 2024
1 parent 8dbf1ba commit 938647e
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions lib/utils/app_scheme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ class PiliScheme {

// 投稿跳转
static Future<void> videoPush(int? aidVal, String? bvidVal) async {
SmartDialog.showLoading<dynamic>(msg: '获取中...');
try {
int? aid = aidVal;
String? bvid = bvidVal;
Expand All @@ -239,17 +238,17 @@ class PiliScheme {
if (bvidVal == null) {
bvid = IdUtils.av2bv(aidVal!);
}
SmartDialog.showLoading<dynamic>(msg: '获取中...');
final int cid = await SearchHttp.ab2c(bvid: bvidVal, aid: aidVal);
SmartDialog.dismiss();
final String heroTag = Utils.makeHeroTag(aid);
SmartDialog.dismiss<dynamic>().then(
// ignore: always_specify_types
(e) => Get.toNamed<dynamic>('/video?bvid=$bvid&cid=$cid',
arguments: <String, String?>{
'pic': null,
'heroTag': heroTag,
}),
);
Get.toNamed<dynamic>('/video?bvid=$bvid&cid=$cid',
arguments: <String, String?>{
'pic': null,
'heroTag': heroTag,
});
} catch (e) {
SmartDialog.dismiss();
SmartDialog.showToast('video获取失败: $e');
}
}
Expand Down

0 comments on commit 938647e

Please sign in to comment.