another rework of event priorities. insert as >=, not as default
This commit is contained in:
parent
df38d7a57f
commit
fc8e0f718c
1 changed files with 2 additions and 2 deletions
|
@ -160,12 +160,12 @@ class EventRoot(object):
|
||||||
|
|
||||||
hooked = False
|
hooked = False
|
||||||
for i, other_hook in enumerate(hook_array):
|
for i, other_hook in enumerate(hook_array):
|
||||||
if other_hook.priority > new_hook.priority:
|
if other_hook.priority >= new_hook.priority:
|
||||||
hooked = True
|
hooked = True
|
||||||
hook_array.insert(i, new_hook)
|
hook_array.insert(i, new_hook)
|
||||||
break
|
break
|
||||||
if not hooked:
|
if not hooked:
|
||||||
hook_array.insert(0, new_hook)
|
hook_array.append(new_hook)
|
||||||
return new_hook
|
return new_hook
|
||||||
|
|
||||||
def _call(self, path: typing.List[str], kwargs: dict, safe: bool,
|
def _call(self, path: typing.List[str], kwargs: dict, safe: bool,
|
||||||
|
|
Loading…
Reference in a new issue