mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-26 11:08:44 +00:00
@@ -11,8 +11,8 @@ class HistoryBaseController extends GetxController {
|
||||
RxInt checkedCount = 0.obs;
|
||||
|
||||
// 清空观看历史
|
||||
Future onClearHistory(BuildContext context, VoidCallback onSuccess) async {
|
||||
await showDialog(
|
||||
void onClearHistory(BuildContext context, VoidCallback onSuccess) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
@@ -40,8 +40,8 @@ class HistoryBaseController extends GetxController {
|
||||
}
|
||||
|
||||
// 暂停观看历史
|
||||
Future onPauseHistory(BuildContext context) async {
|
||||
await showDialog(
|
||||
void onPauseHistory(BuildContext context) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
|
||||
@@ -102,7 +102,7 @@ class HistoryController extends MultiSelectController<HistoryData, HisListItem>
|
||||
}
|
||||
|
||||
// 删除某条历史记录
|
||||
Future delHistory(HisListItem item) async {
|
||||
void delHistory(HisListItem item) {
|
||||
_onDelete([item]);
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ class HistoryController extends MultiSelectController<HistoryData, HisListItem>
|
||||
),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
if (loadingState.value is Success) {
|
||||
_onDelete(((loadingState.value as Success).response
|
||||
|
||||
@@ -238,9 +238,7 @@ class _HistoryPageState extends State<HistoryPage>
|
||||
}
|
||||
|
||||
Widget get _buildPage => refreshIndicator(
|
||||
onRefresh: () async {
|
||||
await _historyController.onRefresh();
|
||||
},
|
||||
onRefresh: _historyController.onRefresh,
|
||||
child: CustomScrollView(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
controller: _historyController.scrollController,
|
||||
|
||||
Reference in New Issue
Block a user