mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: del fav item
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -61,11 +61,12 @@ class FavDetailController extends CommonController {
|
||||
return true;
|
||||
}
|
||||
|
||||
onCancelFav(int id) async {
|
||||
onCancelFav(int id, int type) async {
|
||||
var result = await VideoHttp.favVideo(
|
||||
aid: id,
|
||||
addIds: '',
|
||||
delIds: mediaId.toString(),
|
||||
type: type,
|
||||
);
|
||||
if (result['status']) {
|
||||
List dataList = (loadingState.value as Success).response;
|
||||
|
||||
@@ -302,8 +302,10 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
||||
}
|
||||
return FavVideoCardH(
|
||||
videoItem: loadingState.response[index],
|
||||
callFn: () => _favDetailController
|
||||
.onCancelFav(loadingState.response[index].id),
|
||||
callFn: () => _favDetailController.onCancelFav(
|
||||
loadingState.response[index].id,
|
||||
loadingState.response[index].type,
|
||||
),
|
||||
);
|
||||
},
|
||||
childCount: loadingState.response.length + 1,
|
||||
|
||||
Reference in New Issue
Block a user