From 8abbab4c8896eebf362ff7deca94522b6f17fece Mon Sep 17 00:00:00 2001 From: orz12 Date: Sat, 3 Feb 2024 00:26:34 +0800 Subject: [PATCH] =?UTF-8?q?mod:=20=E6=B7=BB=E5=8A=A0=E7=89=B9=E5=85=B3?= =?UTF-8?q?=E6=8A=95=E7=A8=BF=E7=A7=81=E4=BF=A1=E9=94=99=E8=AF=AF=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../whisper_detail/widget/chat_item.dart | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/lib/pages/whisper_detail/widget/chat_item.dart b/lib/pages/whisper_detail/widget/chat_item.dart index 0925d5694..88ce09468 100644 --- a/lib/pages/whisper_detail/widget/chat_item.dart +++ b/lib/pages/whisper_detail/widget/chat_item.dart @@ -199,17 +199,22 @@ class ChatItem extends StatelessWidget { children: [ GestureDetector( onTap: () async { - SmartDialog.showLoading(); - var bvid = content["bvid"]; - final int cid = await SearchHttp.ab2c(bvid: bvid); - final String heroTag = Utils.makeHeroTag(bvid); - SmartDialog.dismiss().then( - (e) => Get.toNamed('/video?bvid=$bvid&cid=$cid', - arguments: { - 'pic': content['thumb'], - 'heroTag': heroTag, - }), - ); + try { + SmartDialog.showLoading(); + var bvid = content["bvid"]; + final int cid = await SearchHttp.ab2c(bvid: bvid); + final String heroTag = Utils.makeHeroTag(bvid); + SmartDialog.dismiss().then( + (e) => Get.toNamed('/video?bvid=$bvid&cid=$cid', + arguments: { + 'pic': content['thumb'], + 'heroTag': heroTag, + }), + ); + } catch (err) { + SmartDialog.dismiss(); + SmartDialog.showToast(err.toString()); + } }, child: NetworkImgLayer( width: 220,