mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-24 01:58:36 +00:00
tweaks (#1780)
* opt: sized * fix: self send * feat: ctrl enter to send * opt: checked * opt: download notifier * opt: Future.syncValue * mod: account * mod: loading state * opt: DebounceStreamMixin * opt: report * opt: enum map * opt: file handler * opt: dyn color * opt: Uint8List subview * opt: FileExt * opt: computeLuminance * opt: isNullOrEmpty * opt: Get context * update [skip ci] Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> * opt dynamicColor [skip ci] Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> * fixes [skip ci] * update Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> * update Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> --------- Signed-off-by: My-Responsitories <107370289+My-Responsitories@users.noreply.github.com> Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
committed by
GitHub
parent
02e0d34127
commit
ce5e85e64b
@@ -78,7 +78,6 @@ class DownloadPageController extends GetxController
|
||||
title: '确定删除选中视频?',
|
||||
onConfirm: () async {
|
||||
SmartDialog.showLoading();
|
||||
final allChecked = this.allChecked.toSet();
|
||||
final watchProgress = GStorage.watchProgress;
|
||||
for (var page in allChecked) {
|
||||
await watchProgress.deleteAll(
|
||||
|
||||
@@ -27,7 +27,7 @@ class DownloadDetailPage extends StatefulWidget {
|
||||
|
||||
final String pageId;
|
||||
final String title;
|
||||
final ValueNotifier progress;
|
||||
final ChangeNotifier progress;
|
||||
|
||||
@override
|
||||
State<DownloadDetailPage> createState() => _DownloadDetailPageState();
|
||||
@@ -81,6 +81,7 @@ class _DownloadDetailPageState extends State<DownloadDetailPage>
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colorScheme = ColorScheme.of(context);
|
||||
return Obx(() {
|
||||
final enableMultiSelect = this.enableMultiSelect.value;
|
||||
return PopScope(
|
||||
@@ -118,7 +119,7 @@ class _DownloadDetailPageState extends State<DownloadDetailPage>
|
||||
},
|
||||
child: Text(
|
||||
'更新',
|
||||
style: TextStyle(color: Get.theme.colorScheme.onSurface),
|
||||
style: TextStyle(color: colorScheme.onSurface),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -41,7 +41,7 @@ class DetailItem extends StatelessWidget {
|
||||
});
|
||||
|
||||
final BiliDownloadEntryInfo entry;
|
||||
final ValueNotifier? progress;
|
||||
final ChangeNotifier? progress;
|
||||
final DownloadService downloadService;
|
||||
final VoidCallback? onDelete;
|
||||
final bool showTitle;
|
||||
@@ -210,9 +210,9 @@ class DetailItem extends StatelessWidget {
|
||||
type: PBadgeType.gray,
|
||||
),
|
||||
if (progress != null)
|
||||
ValueListenableBuilder(
|
||||
valueListenable: progress!,
|
||||
builder: (_, _, _) {
|
||||
ListenableBuilder(
|
||||
listenable: progress!,
|
||||
builder: (_, _) {
|
||||
final progress = GStorage.watchProgress.get(
|
||||
cid.toString(),
|
||||
);
|
||||
@@ -264,7 +264,7 @@ class DetailItem extends StatelessWidget {
|
||||
type: PBadgeType.gray,
|
||||
),
|
||||
Positioned.fill(
|
||||
child: selectMask(theme, checked ?? entry.checked ?? false),
|
||||
child: selectMask(theme, checked ?? entry.checked),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -17,7 +17,7 @@ class DownloadSearchPage extends StatefulWidget {
|
||||
required this.progress,
|
||||
});
|
||||
|
||||
final ValueNotifier progress;
|
||||
final ChangeNotifier progress;
|
||||
|
||||
@override
|
||||
State<DownloadSearchPage> createState() => _DownloadSearchPageState();
|
||||
|
||||
@@ -33,7 +33,7 @@ class DownloadPage extends StatefulWidget {
|
||||
class _DownloadPageState extends State<DownloadPage> {
|
||||
final _downloadService = Get.find<DownloadService>();
|
||||
final _controller = Get.put(DownloadPageController());
|
||||
final _progress = ValueNotifier(null);
|
||||
final _progress = ChangeNotifier();
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
@@ -197,7 +197,7 @@ class _DownloadPageState extends State<DownloadPage> {
|
||||
entry.cid.toString(),
|
||||
);
|
||||
},
|
||||
checked: item.checked ?? false,
|
||||
checked: item.checked,
|
||||
onSelect: (_) => _controller.onSelect(item),
|
||||
controller: _controller,
|
||||
);
|
||||
@@ -354,7 +354,7 @@ class _DownloadPageState extends State<DownloadPage> {
|
||||
top: 6.0,
|
||||
),
|
||||
Positioned.fill(
|
||||
child: selectMask(theme, pageInfo.checked ?? false),
|
||||
child: selectMask(theme, pageInfo.checked),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user