mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-05 09:37:52 +08:00
@@ -235,62 +235,60 @@ class _DownloadPageState extends State<DownloadPage> {
|
||||
? null
|
||||
: showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
contentPadding: const EdgeInsets.symmetric(vertical: 12),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
ListTile(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
showConfirmDialog(
|
||||
context: context,
|
||||
title: '确定删除?',
|
||||
onConfirm: () async {
|
||||
await GStorage.watchProgress.deleteAll(
|
||||
pageInfo.entries.map((e) => e.cid.toString()),
|
||||
);
|
||||
_downloadService.deletePage(
|
||||
pageDirPath: pageInfo.dirPath,
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
dense: true,
|
||||
title: const Text(
|
||||
'删除',
|
||||
style: TextStyle(fontSize: 14),
|
||||
),
|
||||
builder: (context) => AlertDialog(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
contentPadding: const EdgeInsets.symmetric(vertical: 12),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
ListTile(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
showConfirmDialog(
|
||||
context: context,
|
||||
title: '确定删除?',
|
||||
onConfirm: () async {
|
||||
await GStorage.watchProgress.deleteAll(
|
||||
pageInfo.entries.map((e) => e.cid.toString()),
|
||||
);
|
||||
_downloadService.deletePage(
|
||||
pageDirPath: pageInfo.dirPath,
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
dense: true,
|
||||
title: const Text(
|
||||
'删除',
|
||||
style: TextStyle(fontSize: 14),
|
||||
),
|
||||
ListTile(
|
||||
onTap: () async {
|
||||
Get.back();
|
||||
final res = await Future.wait(
|
||||
pageInfo.entries.map(
|
||||
(e) => _downloadService.downloadDanmaku(
|
||||
entry: e,
|
||||
isUpdate: true,
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
onTap: () async {
|
||||
Get.back();
|
||||
final res = await Future.wait(
|
||||
pageInfo.entries.map(
|
||||
(e) => _downloadService.downloadDanmaku(
|
||||
entry: e,
|
||||
isUpdate: true,
|
||||
),
|
||||
);
|
||||
if (res.every((e) => e)) {
|
||||
SmartDialog.showToast('更新成功');
|
||||
} else {
|
||||
SmartDialog.showToast('更新失败');
|
||||
}
|
||||
},
|
||||
dense: true,
|
||||
title: const Text(
|
||||
'更新弹幕',
|
||||
style: TextStyle(fontSize: 14),
|
||||
),
|
||||
),
|
||||
);
|
||||
if (res.every((e) => e)) {
|
||||
SmartDialog.showToast('更新成功');
|
||||
} else {
|
||||
SmartDialog.showToast('更新失败');
|
||||
}
|
||||
},
|
||||
dense: true,
|
||||
title: const Text(
|
||||
'更新弹幕',
|
||||
style: TextStyle(fontSize: 14),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
final first = pageInfo.entries.first;
|
||||
return Material(
|
||||
|
||||
Reference in New Issue
Block a user