mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-24 10:08:41 +00:00
fix: cacheIndex
This commit is contained in:
@@ -28,8 +28,8 @@ class _BarSetPageState extends State<BarSetPage> {
|
|||||||
.map((e) => Pair(first: e, second: cache?.contains(e.index) ?? true))
|
.map((e) => Pair(first: e, second: cache?.contains(e.index) ?? true))
|
||||||
.toList();
|
.toList();
|
||||||
if (cache != null && cache.isNotEmpty) {
|
if (cache != null && cache.isNotEmpty) {
|
||||||
|
final cacheIndex = {for (var (k, v) in cache.indexed) v: k};
|
||||||
list.sort((a, b) {
|
list.sort((a, b) {
|
||||||
final cacheIndex = {for (var (k, v) in cache.indexed) v: k};
|
|
||||||
final indexA = cacheIndex[a.first.index] ?? cacheIndex.length;
|
final indexA = cacheIndex[a.first.index] ?? cacheIndex.length;
|
||||||
final indexB = cacheIndex[b.first.index] ?? cacheIndex.length;
|
final indexB = cacheIndex[b.first.index] ?? cacheIndex.length;
|
||||||
return indexA.compareTo(indexB);
|
return indexA.compareTo(indexB);
|
||||||
|
|||||||
Reference in New Issue
Block a user