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) { switch (type) {
case 'report': case 'report':
Get.back(); Get.back();
Get.toNamed( dynamic result = await Get.toNamed(
'/webviewnew', '/webviewnew',
parameters: { parameters: {
'url': 'url':
'https://www.bilibili.com/h5/comment/report?mid=${item.mid}&oid=${item.oid}&pageType=1&rpid=${item.rpid}&platform=android', '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; break;
case 'copyAll': case 'copyAll':
await Clipboard.setData(ClipboardData(text: message)); await Clipboard.setData(ClipboardData(text: message));

View File

@@ -132,7 +132,12 @@ class _WebviewPageNewState extends State<WebviewPageNew> {
onTitleChanged: (controller, title) { onTitleChanged: (controller, title) {
_titleStream.add(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) { onLoadStop: (controller, url) {
_webViewController?.evaluateJavascript( _webViewController?.evaluateJavascript(
source: ''' source: '''