mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-05 17:47:46 +08:00
@@ -3,6 +3,7 @@ import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_detail/media.dart';
|
||||
import 'package:PiliPlus/pages/fav_detail/controller.dart';
|
||||
import 'package:PiliPlus/pages/fav_detail/widget/fav_video_card.dart';
|
||||
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -86,8 +87,8 @@ class _FavSortPageState extends State<FavSortPage> {
|
||||
}
|
||||
|
||||
final oldItem = sortList[oldIndex];
|
||||
final newItem = sortList.elementAtOrNull(
|
||||
oldIndex > newIndex ? newIndex - 1 : newIndex,
|
||||
final newItem = sortList.getOrNull(
|
||||
oldIndex > newIndex ? newIndex - 1 : newIndex, // might be Negative
|
||||
);
|
||||
sort.add(
|
||||
'${newItem == null ? '0:0' : '${newItem.id}:${newItem.type}'}:${oldItem.id}:${oldItem.type}',
|
||||
|
||||
Reference in New Issue
Block a user