chore: clean up code comments
This commit is contained in:
@@ -29,7 +29,6 @@ class AlphaJumpHelper {
|
||||
AlphaJumpHelper._(this.letters, this.letterToIndex, this.letterSizes, this.totalItemCount);
|
||||
|
||||
factory AlphaJumpHelper(List<LibraryFirstCharacter> firstCharacters, {bool descending = false}) {
|
||||
// Collect characters with their sizes.
|
||||
final entries = <({String letter, int size})>[];
|
||||
final letterSizes = <String, int>{};
|
||||
|
||||
@@ -41,13 +40,11 @@ class AlphaJumpHelper {
|
||||
}
|
||||
}
|
||||
|
||||
// Re-sort by DUCET collation to match the content endpoint's ICU sort order.
|
||||
entries.sort((a, b) => ducetCompare(a.letter, b.letter));
|
||||
if (descending) {
|
||||
entries.setAll(0, entries.reversed.toList());
|
||||
}
|
||||
|
||||
// Build cumulative index map in the corrected order.
|
||||
final letters = <String>[];
|
||||
final letterToIndex = <String, int>{};
|
||||
int cumulative = 0;
|
||||
|
||||
Reference in New Issue
Block a user