mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: report reply
This commit is contained in:
@@ -73,7 +73,7 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
|||||||
void dispose() {
|
void dispose() {
|
||||||
fabAnimationCtr.dispose();
|
fabAnimationCtr.dispose();
|
||||||
_videoReplyController.scrollController.removeListener(() {});
|
_videoReplyController.scrollController.removeListener(() {});
|
||||||
_videoReplyController.scrollController.dispose();
|
// _videoReplyController.scrollController.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1071,11 +1071,23 @@ InlineSpan buildContent(
|
|||||||
|
|
||||||
class MorePanel extends StatelessWidget {
|
class MorePanel extends StatelessWidget {
|
||||||
final ReplyItemModel item;
|
final ReplyItemModel item;
|
||||||
|
|
||||||
const MorePanel({super.key, required this.item});
|
const MorePanel({super.key, required this.item});
|
||||||
|
|
||||||
Future<dynamic> menuActionHandler(String type) async {
|
Future<dynamic> menuActionHandler(String type) async {
|
||||||
String message = item.content?.message ?? '';
|
String message = item.content?.message ?? '';
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
case 'report':
|
||||||
|
Get.back();
|
||||||
|
Get.toNamed(
|
||||||
|
'/webview',
|
||||||
|
parameters: {
|
||||||
|
'url':
|
||||||
|
'https://www.bilibili.com/h5/comment/report?mid=${item.mid}&oid=${item.oid}&pageType=1&rpid=${item.rpid}&platform=android',
|
||||||
|
'type': 'url',
|
||||||
|
},
|
||||||
|
);
|
||||||
|
break;
|
||||||
case 'copyAll':
|
case 'copyAll':
|
||||||
await Clipboard.setData(ClipboardData(text: message));
|
await Clipboard.setData(ClipboardData(text: message));
|
||||||
SmartDialog.showToast('已复制');
|
SmartDialog.showToast('已复制');
|
||||||
@@ -1100,6 +1112,7 @@ class MorePanel extends StatelessWidget {
|
|||||||
// break;
|
// break;
|
||||||
case 'delete':
|
case 'delete':
|
||||||
//弹出确认提示:
|
//弹出确认提示:
|
||||||
|
Get.back();
|
||||||
bool? isDelete = await showDialog<bool>(
|
bool? isDelete = await showDialog<bool>(
|
||||||
context: Get.context!,
|
context: Get.context!,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
@@ -1187,6 +1200,17 @@ class MorePanel extends StatelessWidget {
|
|||||||
.titleSmall!
|
.titleSmall!
|
||||||
.copyWith(color: errorColor)),
|
.copyWith(color: errorColor)),
|
||||||
),
|
),
|
||||||
|
if (GStorage.userInfo.get('userInfoCache') != null)
|
||||||
|
ListTile(
|
||||||
|
onTap: () async => await menuActionHandler('report'),
|
||||||
|
minLeadingWidth: 0,
|
||||||
|
leading: Icon(Icons.error_outline, color: errorColor, size: 19),
|
||||||
|
title: Text('举报',
|
||||||
|
style: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.titleSmall!
|
||||||
|
.copyWith(color: errorColor)),
|
||||||
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
onTap: () async => await menuActionHandler('copyAll'),
|
onTap: () async => await menuActionHandler('copyAll'),
|
||||||
minLeadingWidth: 0,
|
minLeadingWidth: 0,
|
||||||
@@ -1199,6 +1223,7 @@ class MorePanel extends StatelessWidget {
|
|||||||
leading: const Icon(Icons.copy_outlined, size: 19),
|
leading: const Icon(Icons.copy_outlined, size: 19),
|
||||||
title: Text('自由复制', style: Theme.of(context).textTheme.titleSmall),
|
title: Text('自由复制', style: Theme.of(context).textTheme.titleSmall),
|
||||||
),
|
),
|
||||||
|
|
||||||
// ListTile(
|
// ListTile(
|
||||||
// onTap: () async => await menuActionHandler('block'),
|
// onTap: () async => await menuActionHandler('block'),
|
||||||
// minLeadingWidth: 0,
|
// minLeadingWidth: 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user