Commit b28ba53
committed
Fix board date sorting on downloads page
The sort comparator had several issues causing date sorting to
produce unexpected results:
1. Exact tag match promotion ran before the sort type switch for
all sort modes, overriding date and alphabetical sorts. Tag
match promotion now only applies to the default (downloads)
sort.
2. The tag match only checked item 'a' and returned -2, not
comparing 'b'. Both items are now compared symmetrically.
3. Date and download count comparators used ternary conditional
returns instead of subtraction, never returning 0 for equal
values. Changed to use arithmetic subtraction for proper
three-way comparison.
4. The filterResults tag-match DOM reordering also ignored the
current sort selection. Now respects the active sort choice.
Fixes #17601 parent 17c2dcc commit b28ba53
1 file changed
Lines changed: 18 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
353 | | - | |
354 | | - | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
355 | 357 | | |
356 | 358 | | |
357 | 359 | | |
| |||
376 | 378 | | |
377 | 379 | | |
378 | 380 | | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
384 | 388 | | |
385 | 389 | | |
386 | 390 | | |
387 | 391 | | |
388 | 392 | | |
389 | 393 | | |
390 | 394 | | |
391 | | - | |
392 | | - | |
393 | | - | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
394 | 398 | | |
395 | | - | |
396 | | - | |
397 | | - | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
398 | 402 | | |
399 | 403 | | |
400 | | - | |
| 404 | + | |
401 | 405 | | |
402 | 406 | | |
403 | 407 | | |
| |||
0 commit comments