mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-27 01:13:13 +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: (
|
||||
p['queue'] is None, # Show non-queued last.
|
||||
p['ping'] if p['ping'] is not None else 999999,
|
||||
p['index'],
|
||||
p))
|
||||
p['index']))
|
||||
existing_selection = self._public_party_list_selection
|
||||
first = True
|
||||
|
||||
|
||||
@ -303,4 +303,6 @@ def make_hash(obj: Any) -> int:
|
||||
for k, v in new_obj.items():
|
||||
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()))))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user