diff --git a/lib/pages/dynamics/widgets/author_panel.dart b/lib/pages/dynamics/widgets/author_panel.dart index 2e0b1147..11d35d6f 100644 --- a/lib/pages/dynamics/widgets/author_panel.dart +++ b/lib/pages/dynamics/widgets/author_panel.dart @@ -19,6 +19,7 @@ import 'package:PiliPlus/utils/page_utils.dart'; import 'package:PiliPlus/utils/request_utils.dart'; import 'package:PiliPlus/utils/utils.dart'; import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/foundation.dart' show kDebugMode; import 'package:flutter/material.dart' hide InkWell; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:get/get.dart' hide ContextExtensionss; @@ -370,7 +371,7 @@ class AuthorPanel extends StatelessWidget { }, minLeadingWidth: 0, ), - if (moduleAuthor.mid == Accounts.main.mid) ...[ + if (kDebugMode || moduleAuthor.mid == Accounts.main.mid) ...[ ListTile( onTap: () { Get.back(); diff --git a/lib/pages/video/reply/widgets/reply_item_grpc.dart b/lib/pages/video/reply/widgets/reply_item_grpc.dart index 89765699..a639cd4e 100644 --- a/lib/pages/video/reply/widgets/reply_item_grpc.dart +++ b/lib/pages/video/reply/widgets/reply_item_grpc.dart @@ -1055,7 +1055,7 @@ class ReplyItemGrpc extends StatelessWidget { leading: const Icon(Icons.save_alt, size: 19), title: Text('保存评论', style: style), ), - if (item.mid == ownerMid) + if (kDebugMode || item.mid == ownerMid) ListTile( onTap: () { Get.back(); diff --git a/lib/plugin/pl_player/view.dart b/lib/plugin/pl_player/view.dart index 327637ae..f3e4fb82 100644 --- a/lib/plugin/pl_player/view.dart +++ b/lib/plugin/pl_player/view.dart @@ -1058,7 +1058,7 @@ class _PLVideoPlayerState extends State void onTap(PointerDeviceKind? kind) { switch (kind) { - case ui.PointerDeviceKind.mouse: + case ui.PointerDeviceKind.mouse when Utils.isDesktop: onTapDesktop(); break; default: @@ -1069,7 +1069,7 @@ class _PLVideoPlayerState extends State void onDoubleTapDown(TapDownDetails details) { switch (details.kind) { - case ui.PointerDeviceKind.mouse: + case ui.PointerDeviceKind.mouse when Utils.isDesktop: onDoubleTapDesktop(); break; default: diff --git a/lib/utils/reply_utils.dart b/lib/utils/reply_utils.dart index 7b58d21b..3f8d0d96 100644 --- a/lib/utils/reply_utils.dart +++ b/lib/utils/reply_utils.dart @@ -105,29 +105,30 @@ class ReplyUtils { title: const Text('评论检查结果'), content: SelectableText(message), actions: [ - TextButton( - onPressed: () { - Get.back(); - String? uri; - switch (type) { - case 1: - uri = IdUtils.av2bv(oid); - case 17: - uri = 'https://www.bilibili.com/opus/$oid'; - } - if (uri != null) { - Utils.copyText(uri); - } - Get.toNamed( - '/webview', - parameters: { - 'url': - 'https://www.bilibili.com/h5/comment/appeal?native.theme=2&night=${Get.isDarkMode ? 1 : 0}', - }, - ); - }, - child: const Text('申诉'), - ), + if (isBan) + TextButton( + onPressed: () { + Get.back(); + String? uri; + switch (type) { + case 1: + uri = IdUtils.av2bv(oid); + case 17: + uri = 'https://www.bilibili.com/opus/$oid'; + } + if (uri != null) { + Utils.copyText(uri); + } + Get.toNamed( + '/webview', + parameters: { + 'url': + 'https://www.bilibili.com/h5/comment/appeal?native.theme=2&night=${Get.isDarkMode ? 1 : 0}', + }, + ); + }, + child: const Text('申诉'), + ), TextButton( onPressed: Get.back, child: const Text('关闭'), diff --git a/lib/utils/request_utils.dart b/lib/utils/request_utils.dart index d982c2cd..e36b0ca5 100644 --- a/lib/utils/request_utils.dart +++ b/lib/utils/request_utils.dart @@ -317,28 +317,30 @@ abstract class RequestUtils { await Future.delayed(const Duration(seconds: 5)); } var res = await DynamicsHttp.dynamicDetail(id: id, clearCookie: true); + final isSuccess = res.isSuccess; Get.dialog( barrierDismissible: isManual, AlertDialog( title: const Text('动态检查结果'), content: SelectableText( - '${res.isSuccess ? '无账号状态下找到了你的动态,动态正常!' : '你的动态被shadow ban(仅自己可见)!'}${dynText != null ? ' \n\n动态内容: $dynText' : ''}', + '${isSuccess ? '无账号状态下找到了你的动态,动态正常!' : '你的动态被shadow ban(仅自己可见)!'}${dynText != null ? ' \n\n动态内容: $dynText' : ''}', ), actions: [ - TextButton( - onPressed: () { - Get.back(); - Utils.copyText('https://www.bilibili.com/opus/$id'); - Get.toNamed( - '/webview', - parameters: { - 'url': - 'https://www.bilibili.com/h5/comment/appeal?native.theme=2&night=${Get.isDarkMode ? 1 : 0}', - }, - ); - }, - child: const Text('申诉'), - ), + if (!isSuccess) + TextButton( + onPressed: () { + Get.back(); + Utils.copyText('https://www.bilibili.com/opus/$id'); + Get.toNamed( + '/webview', + parameters: { + 'url': + 'https://www.bilibili.com/h5/comment/appeal?native.theme=2&night=${Get.isDarkMode ? 1 : 0}', + }, + ); + }, + child: const Text('申诉'), + ), TextButton( onPressed: Get.back, child: const Text('关闭'),