Skip to content

Commit

Permalink
mod: 添加特关投稿私信错误处理
Browse files Browse the repository at this point in the history
  • Loading branch information
orz12 committed Feb 2, 2024
1 parent a95082f commit 8abbab4
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions lib/pages/whisper_detail/widget/chat_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<dynamic>().then(
(e) => Get.toNamed<dynamic>('/video?bvid=$bvid&cid=$cid',
arguments: <String, String?>{
'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<dynamic>().then(
(e) => Get.toNamed<dynamic>('/video?bvid=$bvid&cid=$cid',
arguments: <String, String?>{
'pic': content['thumb'],
'heroTag': heroTag,
}),
);
} catch (err) {
SmartDialog.dismiss();
SmartDialog.showToast(err.toString());
}
},
child: NetworkImgLayer(
width: 220,
Expand Down

0 comments on commit 8abbab4

Please sign in to comment.