You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
inbox: Sort once, not twice, as List.sort may not be stable
The trick of sorting first by the low-order key and then by
the high-order key works great if the sort algorithm leaves
elements in their existing relative order when they compare
equal, aka if the sort is "stable".
But Dart's List.sort disclaims any guarantee of being stable.
So this trick doesn't work; the pinned streams and unpinned
streams could each get scrambled out of alphabetical order
in the course of the second sort.
Instead do one sort, with a comparison function that looks
at both criteria.
0 commit comments