mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-30 23:58:13 +08:00
opt: multiSelect (#935)
This commit is contained in:
committed by
GitHub
parent
d246462535
commit
7b51f15753
@@ -23,7 +23,7 @@ class LaterSearchController
|
||||
return response.list;
|
||||
}
|
||||
|
||||
Future<void> toViewDel(BuildContext context, int index, aid) async {
|
||||
Future<void> toViewDel(BuildContext context, int index, int aid) async {
|
||||
var res = await UserHttp.toViewDel(aids: [aid]);
|
||||
if (res['status']) {
|
||||
loadingState.value.data!.removeAt(index);
|
||||
@@ -31,4 +31,25 @@ class LaterSearchController
|
||||
}
|
||||
SmartDialog.showToast(res['msg']);
|
||||
}
|
||||
|
||||
// @override
|
||||
// void onConfirm() {
|
||||
// showConfirmDialog(
|
||||
// context: Get.context!,
|
||||
// content: '确认删除所选稍后再看吗?',
|
||||
// title: '提示',
|
||||
// onConfirm: () async {
|
||||
// final result = allChecked.toSet();
|
||||
// SmartDialog.showLoading(msg: '请求中');
|
||||
// var res = await UserHttp.toViewDel(
|
||||
// aids: result.map((item) => item.aid!),
|
||||
// );
|
||||
// if (res['status']) {
|
||||
// afterDelete(result);
|
||||
// }
|
||||
// SmartDialog.dismiss();
|
||||
// SmartDialog.showToast(res['msg']);
|
||||
// },
|
||||
// );
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -27,6 +27,31 @@ class _LaterSearchPageState
|
||||
tag: Utils.generateRandomString(8),
|
||||
);
|
||||
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// // TODO: refa
|
||||
// return Obx(() {
|
||||
// final parent = super.build(context) as Scaffold;
|
||||
// final enableMultiSelect = controller.enableMultiSelect.value;
|
||||
// return PopScope(
|
||||
// canPop: !enableMultiSelect,
|
||||
// onPopInvokedWithResult: (didPop, result) {
|
||||
// if (enableMultiSelect) {
|
||||
// controller.handleSelect();
|
||||
// }
|
||||
// },
|
||||
// child: Scaffold(
|
||||
// resizeToAvoidBottomInset: parent.resizeToAvoidBottomInset,
|
||||
// appBar: MultiSelectAppBarWidget(
|
||||
// ctr: controller,
|
||||
// child: parent.appBar as AppBar,
|
||||
// ),
|
||||
// body: parent.body,
|
||||
// ),
|
||||
// );
|
||||
// });
|
||||
// }
|
||||
|
||||
@override
|
||||
Widget buildList(List<LaterItemModel> list) {
|
||||
return SliverGrid(
|
||||
@@ -73,7 +98,7 @@ class _LaterSearchPageState
|
||||
onConfirm: () => controller.toViewDel(
|
||||
context,
|
||||
index,
|
||||
item.aid,
|
||||
item.aid!,
|
||||
),
|
||||
),
|
||||
icon: Icons.clear,
|
||||
|
||||
Reference in New Issue
Block a user