* refa: log

* upgrade deps
This commit is contained in:
My-Responsitories
2026-05-26 11:44:32 +00:00
committed by GitHub
parent 56756c5c85
commit 41c8e1a538
14 changed files with 144 additions and 302 deletions

View File

@@ -56,25 +56,20 @@ class _FavFolderSortPageState extends State<FavFolderSortPage>
);
}
void onReorder(int oldIndex, int newIndex) {
void onReorderItem(int oldIndex, int newIndex) {
if (oldIndex == 0 || newIndex == 0) {
SmartDialog.showToast('默认收藏夹不支持排序');
return;
}
if (newIndex > oldIndex) {
newIndex -= 1;
}
final tabsItem = sortList.removeAt(oldIndex);
sortList.insert(newIndex, tabsItem);
sortList.insert(newIndex, sortList.removeAt(oldIndex));
setState(() {});
}
Widget get _buildBody {
return ReorderableListView.builder(
onReorder: onReorder,
onReorderItem: onReorderItem,
proxyDecorator: proxyDecorator,
physics: const AlwaysScrollableScrollPhysics(),
itemCount: sortList.length,