mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: del history
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -296,6 +296,8 @@ class _HistoryPageState extends State<HistoryPage>
|
||||
videoItem: loadingState.response[index],
|
||||
ctr: _historyController.baseCtr,
|
||||
onChoose: () => _historyController.onSelect(index),
|
||||
onDelete: (kid, business) =>
|
||||
_historyController.delHistory(kid, business),
|
||||
);
|
||||
},
|
||||
childCount: loadingState.response.length,
|
||||
|
||||
@@ -23,11 +23,14 @@ class HistoryItem extends StatelessWidget {
|
||||
final dynamic videoItem;
|
||||
final dynamic ctr;
|
||||
final Function? onChoose;
|
||||
final Function? onDelete;
|
||||
|
||||
const HistoryItem({
|
||||
super.key,
|
||||
required this.videoItem,
|
||||
this.ctr,
|
||||
this.onChoose,
|
||||
this.onDelete,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -374,8 +377,11 @@ class HistoryItem extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
PopupMenuItem<String>(
|
||||
onTap: () => ctr!.delHistory(
|
||||
videoItem.kid, videoItem.history.business),
|
||||
onTap: () => ctr is HistoryBaseController
|
||||
? onDelete?.call(
|
||||
videoItem.kid, videoItem.history.business)
|
||||
: ctr!.delHistory(
|
||||
videoItem.kid, videoItem.history.business),
|
||||
height: 35,
|
||||
child: const Row(
|
||||
children: [
|
||||
|
||||
Reference in New Issue
Block a user