mod: remove reply after reported

This commit is contained in:
bggRGjQaUbCoE
2024-09-22 10:56:03 +08:00
parent 7707a78489
commit c9ab18ec37
2 changed files with 10 additions and 2 deletions

View File

@@ -1048,13 +1048,16 @@ class MorePanel extends StatelessWidget {
switch (type) {
case 'report':
Get.back();
Get.toNamed(
dynamic result = await Get.toNamed(
'/webviewnew',
parameters: {
'url':
'https://www.bilibili.com/h5/comment/report?mid=${item.mid}&oid=${item.oid}&pageType=1&rpid=${item.rpid}&platform=android',
},
);
if (result == true && onDelete != null) {
onDelete!(item.rpid!);
}
break;
case 'copyAll':
await Clipboard.setData(ClipboardData(text: message));

View File

@@ -132,7 +132,12 @@ class _WebviewPageNewState extends State<WebviewPageNew> {
onTitleChanged: (controller, title) {
_titleStream.add(title);
},
onCloseWindow: (controller) => Get.back(),
onCloseWindow: (controller) => Get.back(
result:
_url.startsWith('https://www.bilibili.com/h5/comment/report')
? true
: null,
),
onLoadStop: (controller, url) {
_webViewController?.evaluateJavascript(
source: '''