Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-01-29 13:35:51 +08:00
parent bcbfe5c849
commit 5979ddb60c
46 changed files with 3266 additions and 3293 deletions

View File

@@ -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(