diff --git a/lib/pages/video/detail/view.dart b/lib/pages/video/detail/view.dart index 35e85520a..d0caa3967 100644 --- a/lib/pages/video/detail/view.dart +++ b/lib/pages/video/detail/view.dart @@ -994,7 +994,7 @@ class _VideoDetailPageState extends State primary: false, foregroundColor: Colors.white, backgroundColor: Colors.transparent, - actions: (videoDetailController.userInfo == null) + actions: videoDetailController.userInfo == null ? null : [ PopupMenuButton( diff --git a/lib/pages/video/detail/widgets/header_control.dart b/lib/pages/video/detail/widgets/header_control.dart index c10ac9ffa..db2aaf3dd 100644 --- a/lib/pages/video/detail/widgets/header_control.dart +++ b/lib/pages/video/detail/widgets/header_control.dart @@ -2,6 +2,7 @@ import 'dart:async'; import 'dart:io'; import 'dart:math'; +import 'package:PiliPalaX/utils/id_utils.dart'; import 'package:floating/floating.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -177,12 +178,25 @@ class _HeaderControlState extends State { // ), // ), // ), + if (widget.videoDetailCtr?.userInfo != null) + ListTile( + onTap: () { + Get.back(); + Get.toNamed('/webviewnew', parameters: { + 'url': + 'https://www.bilibili.com/appeal/?avid=${IdUtils.bv2av(widget.videoDetailCtr!.bvid)}&bvid=${widget.videoDetailCtr!.bvid}' + }); + }, + dense: true, + leading: const Icon(Icons.error_outline, size: 20), + title: const Text('举报', style: titleStyle), + ), ListTile( onTap: () async { + Get.back(); final res = await UserHttp.toViewLater( bvid: widget.videoDetailCtr!.bvid); SmartDialog.showToast(res['msg']); - Get.back(); }, dense: true, leading: const Icon(Icons.watch_later_outlined, size: 20),