mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-18 23:23:58 +08:00
tweaks (#2032)
* fix: 1080p * opt: import export * opt: downloader * opt: skeleton * opt: parseColor * tweak * opt: sb seek * opt: rxn
This commit is contained in:
committed by
GitHub
parent
b7b40c557e
commit
f5dbfcec79
@@ -103,16 +103,16 @@ class _DownloadDetailPageState extends State<DownloadDetailPage>
|
||||
visualDensity: VisualDensity.compact,
|
||||
),
|
||||
onPressed: () async {
|
||||
final allChecked = this.allChecked.toSet();
|
||||
final futures = allChecked
|
||||
.map(
|
||||
(e) => _downloadService.downloadDanmaku(
|
||||
entry: e,
|
||||
isUpdate: true,
|
||||
),
|
||||
)
|
||||
.toList();
|
||||
handleSelect();
|
||||
final res = await Future.wait(
|
||||
allChecked.map(
|
||||
(e) => _downloadService.downloadDanmaku(
|
||||
entry: e,
|
||||
isUpdate: true,
|
||||
),
|
||||
),
|
||||
);
|
||||
final res = await Future.wait(futures);
|
||||
if (res.every((e) => e)) {
|
||||
SmartDialog.showToast('更新成功');
|
||||
} else {
|
||||
@@ -201,22 +201,20 @@ class _DownloadDetailPageState extends State<DownloadDetailPage>
|
||||
title: const Text('确定删除选中视频?'),
|
||||
onConfirm: () async {
|
||||
SmartDialog.showLoading();
|
||||
final watchProgress = GStorage.watchProgress;
|
||||
final allChecked = this.allChecked.toSet();
|
||||
final allChecked = this.allChecked.toList();
|
||||
final isDeleteAll = allChecked.length == _downloadItems.length;
|
||||
if (isDeleteAll) {
|
||||
await _closeSub();
|
||||
}
|
||||
for (final entry in allChecked) {
|
||||
await watchProgress.deleteAll(
|
||||
await Future.wait([
|
||||
if (isDeleteAll) _closeSub(),
|
||||
GStorage.watchProgress.deleteAll(
|
||||
allChecked.map((e) => e.cid.toString()),
|
||||
);
|
||||
await _downloadService.deleteDownload(
|
||||
entry: entry,
|
||||
removeList: true,
|
||||
refresh: false,
|
||||
);
|
||||
}
|
||||
),
|
||||
for (final entry in allChecked)
|
||||
_downloadService.deleteDownload(
|
||||
entry: entry,
|
||||
removeList: true,
|
||||
refresh: false,
|
||||
),
|
||||
]);
|
||||
_downloadService.flagNotifier.refresh();
|
||||
if (isDeleteAll) {
|
||||
SmartDialog.dismiss();
|
||||
|
||||
@@ -275,7 +275,10 @@ class DetailItem extends StatelessWidget {
|
||||
type: PBadgeType.gray,
|
||||
),
|
||||
Positioned.fill(
|
||||
child: selectMask(theme, checked ?? entry.checked),
|
||||
child: selectMask(
|
||||
theme.colorScheme,
|
||||
checked ?? entry.checked,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user