mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-22 11:41:09 +08:00
@@ -22,7 +22,8 @@ class _FavSortPageState extends State<FavSortPage> {
|
||||
|
||||
final GlobalKey _key = GlobalKey();
|
||||
late List<FavDetailItemModel> sortList = List<FavDetailItemModel>.from(
|
||||
_favDetailController.loadingState.value.data!);
|
||||
_favDetailController.loadingState.value.data!,
|
||||
);
|
||||
List<String> sort = <String>[];
|
||||
|
||||
final ScrollController _scrollController = ScrollController();
|
||||
@@ -107,10 +108,12 @@ class _FavSortPageState extends State<FavSortPage> {
|
||||
}
|
||||
|
||||
final oldItem = sortList[oldIndex];
|
||||
final newItem =
|
||||
sortList.getOrNull(oldIndex > newIndex ? newIndex - 1 : newIndex);
|
||||
final newItem = sortList.getOrNull(
|
||||
oldIndex > newIndex ? newIndex - 1 : newIndex,
|
||||
);
|
||||
sort.add(
|
||||
'${newItem == null ? '0:0' : '${newItem.id}:${newItem.type}'}:${oldItem.id}:${oldItem.type}');
|
||||
'${newItem == null ? '0:0' : '${newItem.id}:${newItem.type}'}:${oldItem.id}:${oldItem.type}',
|
||||
);
|
||||
|
||||
final tabsItem = sortList.removeAt(oldIndex);
|
||||
sortList.insert(newIndex, tabsItem);
|
||||
|
||||
Reference in New Issue
Block a user