Fix #179, don't allow to push messages if no apps available #182
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When entering the "Push message/ShareActivity" page, I wanted to keep the "Push Message"-Button enabled by default and disable it if necessary (no apps available, request for apps failed). Otherwise the button would be rendered in disabled state first and after the successful request it would be rendered again in enabled state (everytime the user wants to send a message the normal way -> IMHO: That's not smooth).
But this means, there's a small risk that the user could hit the button without an app selected, if loading the apps needs too much time. If that really happens, the user will see a toast message.
I also added a kind of info box which informs the user about the fact that he needs to provide at least one application to push a message.
Fixes #179