-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to install multiple apps #167
Conversation
c00b9a3
to
c7df4c8
Compare
modules/system/eventbus.py
Outdated
@@ -40,10 +40,16 @@ def remove(self, event_type, event_handler, app): | |||
if app in self.handlers: | |||
if event_type in self.handlers[app]: | |||
if event_handler in self.handlers[app][event_type]: | |||
print( | |||
"Removed event handler for {event_type}: {app.__class__.__name__} - {event_handler.__name__}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still needs fixing before merge
tested this, works for me. |
@@ -86,8 +92,13 @@ def background_update(self, delta): | |||
return | |||
self.update_state("index_received") | |||
if self.to_install_app: | |||
self.install_app(self.to_install_app) | |||
self.to_install_app = None | |||
# We wait one cycle after background_update is called to ensure the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels a bit hacky but because update and draw may not be called while an app is installing I'm really not sure how else to fix it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, it is, but it makes sense. async_helpers.unblock
is designed to help with this kind of thing, lemme try a spike.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MatthewWilkes why don't we merge this and then you can prettify it subsequently? It would be nice to have this functionality in
I think this fixes #120