From 938647effe95388f80a8f407afc16b84e0f59e68 Mon Sep 17 00:00:00 2001 From: orz12 Date: Mon, 26 Aug 2024 01:42:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8A=95=E7=A8=BF=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E5=88=B0=E5=B7=B2=E5=A4=B1=E6=95=88=E8=A7=86=E9=A2=91=E6=97=B6?= =?UTF-8?q?=E5=8D=A1=E4=BD=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/utils/app_scheme.dart | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/utils/app_scheme.dart b/lib/utils/app_scheme.dart index b90201abb..d256e5e10 100644 --- a/lib/utils/app_scheme.dart +++ b/lib/utils/app_scheme.dart @@ -229,7 +229,6 @@ class PiliScheme { // 投稿跳转 static Future videoPush(int? aidVal, String? bvidVal) async { - SmartDialog.showLoading(msg: '获取中...'); try { int? aid = aidVal; String? bvid = bvidVal; @@ -239,17 +238,17 @@ class PiliScheme { if (bvidVal == null) { bvid = IdUtils.av2bv(aidVal!); } + SmartDialog.showLoading(msg: '获取中...'); final int cid = await SearchHttp.ab2c(bvid: bvidVal, aid: aidVal); + SmartDialog.dismiss(); final String heroTag = Utils.makeHeroTag(aid); - SmartDialog.dismiss().then( - // ignore: always_specify_types - (e) => Get.toNamed('/video?bvid=$bvid&cid=$cid', - arguments: { - 'pic': null, - 'heroTag': heroTag, - }), - ); + Get.toNamed('/video?bvid=$bvid&cid=$cid', + arguments: { + 'pic': null, + 'heroTag': heroTag, + }); } catch (e) { + SmartDialog.dismiss(); SmartDialog.showToast('video获取失败: $e'); } }