Skip to content
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

Merged
merged 3 commits into from
Aug 4, 2024
Merged

Allow to install multiple apps #167

merged 3 commits into from
Aug 4, 2024

Conversation

npentrel
Copy link
Contributor

@npentrel npentrel commented Jun 22, 2024

I think this fixes #120

@@ -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__}"
Copy link
Contributor Author

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

@ChrisDick
Copy link
Contributor

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
Copy link
Contributor Author

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

Copy link
Member

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.

Copy link
Contributor Author

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

@npentrel npentrel merged commit 8e1ba36 into emfcamp:main Aug 4, 2024
3 checks passed
@npentrel npentrel deleted the 120 branch August 4, 2024 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot install apps consecutively from the store
4 participants