mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-06 23:59:18 +08:00
add sorting key for some sorted functions
for sorting nested lists
This commit is contained in:
parent
78e70e002c
commit
ea99108202
@ -1451,8 +1451,7 @@ class GatherWindow(ba.Window):
|
|||||||
key=lambda p: (
|
key=lambda p: (
|
||||||
p['queue'] is None, # Show non-queued last.
|
p['queue'] is None, # Show non-queued last.
|
||||||
p['ping'] if p['ping'] is not None else 999999,
|
p['ping'] if p['ping'] is not None else 999999,
|
||||||
p['index'],
|
p['index']))
|
||||||
p))
|
|
||||||
existing_selection = self._public_party_list_selection
|
existing_selection = self._public_party_list_selection
|
||||||
first = True
|
first = True
|
||||||
|
|
||||||
|
|||||||
@ -303,4 +303,6 @@ def make_hash(obj: Any) -> int:
|
|||||||
for k, v in new_obj.items():
|
for k, v in new_obj.items():
|
||||||
new_obj[k] = make_hash(v)
|
new_obj[k] = make_hash(v)
|
||||||
|
|
||||||
|
# NOTE: there is sorted works correctly because it compares only
|
||||||
|
# unique first values (i.e. dict keys)
|
||||||
return hash(tuple(frozenset(sorted(new_obj.items()))))
|
return hash(tuple(frozenset(sorted(new_obj.items()))))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user