mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-21 17:46:24 +08:00
opt: select (#937)
This commit is contained in:
committed by
GitHub
parent
afb09e8a0a
commit
01552801f2
@@ -1,14 +1,17 @@
|
||||
import 'package:PiliPlus/common/widgets/dialog/dialog.dart';
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/http/user.dart';
|
||||
import 'package:PiliPlus/models_new/later/data.dart';
|
||||
import 'package:PiliPlus/models_new/later/list.dart';
|
||||
import 'package:PiliPlus/pages/common/common_search_controller.dart';
|
||||
import 'package:PiliPlus/pages/common/multi_select_controller.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class LaterSearchController
|
||||
extends CommonSearchController<LaterData, LaterItemModel> {
|
||||
extends CommonSearchController<LaterData, LaterItemModel>
|
||||
with CommonMultiSelectMixin<LaterItemModel>, DeleteItemMixin {
|
||||
dynamic mid = Get.arguments['mid'];
|
||||
dynamic count = Get.arguments['count'];
|
||||
|
||||
@@ -32,24 +35,24 @@ 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']);
|
||||
// },
|
||||
// );
|
||||
// }
|
||||
@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']);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user