Skip to content

Conversation

@acostarelli
Copy link
Contributor

Added system for displaying errors to the user via a modal.

Changed the way Cardshifter.setMessageListener works.

This has a single method for creating and modal/popup that displays a desired message. Right now, this does not work and I think it has something to do with the module and how it changes for services rather than controllers.
Before, when using setMessageListener, all the controllers would look about the same in that area: they would have a commandMap for all the types of messages they were looking for, or, they would just accept a single type of message. Then, inside the listener function body that was passed to setMessageListener, it would call the correct function in the commandMap and then use $scope.$apply to apply it.

Now, the setMessageListener method will accept the commandMap as one of it's parameters (along with the scope) so there is none of this repetitiion across controllers.
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.

4 participants