refactor: separate content from presentation assets
This commit is contained in:
@@ -53,7 +53,7 @@ func get_pending_ids() -> Array[StringName]:
|
||||
var result: Array[StringName] = []
|
||||
for stable_id in _pending_by_id:
|
||||
result.append(StringName(stable_id))
|
||||
result.sort()
|
||||
result.sort_custom(_stable_id_before)
|
||||
return result
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ func get_in_flight_ids() -> Array[StringName]:
|
||||
var result: Array[StringName] = []
|
||||
for stable_id in _in_flight_ids:
|
||||
result.append(StringName(stable_id))
|
||||
result.sort()
|
||||
result.sort_custom(_stable_id_before)
|
||||
return result
|
||||
|
||||
|
||||
@@ -75,3 +75,7 @@ func _request_before(first: Dictionary, second: Dictionary) -> bool:
|
||||
if int(first["priority"]) != int(second["priority"]):
|
||||
return int(first["priority"]) > int(second["priority"])
|
||||
return String(first["stable_id"]) < String(second["stable_id"])
|
||||
|
||||
|
||||
func _stable_id_before(first: StringName, second: StringName) -> bool:
|
||||
return String(first) < String(second)
|
||||
|
||||
Reference in New Issue
Block a user