sort follow tag

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-04-27 20:53:55 +08:00
parent 89fdc28150
commit 80ecd35784
8 changed files with 214 additions and 21 deletions

View File

@@ -51,22 +51,25 @@ class _FavSortPageState extends State<FavSortPage> {
title: Text('排序: ${_favDetailController.folderInfo.value.title}'),
actions: [
TextButton(
onPressed: () async {
onPressed: () {
if (sort.isEmpty) {
Get.back();
return;
}
final res = await FavHttp.sortFav(
FavHttp.sortFav(
mediaId: _favDetailController.mediaId,
sort: sort.join(','),
);
if (res.isSuccess) {
SmartDialog.showToast('排序完成');
_favDetailController.loadingState.value = Success(sortList);
Get.back();
} else {
res.toast();
}
).then((res) {
if (res.isSuccess) {
SmartDialog.showToast('排序完成');
_favDetailController.loadingState.value = Success(sortList);
if (mounted) {
Get.back();
}
} else {
res.toast();
}
});
},
child: const Text('完成'),
),
@@ -108,7 +111,7 @@ class _FavSortPageState extends State<FavSortPage> {
itemBuilder: (context, index) {
final item = sortList[index];
return SizedBox(
key: Key(item.id.toString()),
key: ValueKey(item.id),
height: 98,
child: FavVideoCardH(item: item),
);