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

Fix #179, don't allow to push messages if no apps available #182

Merged
merged 7 commits into from
Jul 27, 2021
Merged

Fix #179, don't allow to push messages if no apps available #182

merged 7 commits into from
Jul 27, 2021

Conversation

Sternagfonkel
Copy link
Contributor

@Sternagfonkel Sternagfonkel commented Jul 26, 2021

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.

Screenshot_1627317742 Screenshot_1627316796

Fixes #179

Markus added 6 commits July 23, 2021 22:44
Now also working in landscape mode.
So button is only enabled when received one or more apps successful
Some formatting
Setting buttons default state back to enabled and
disable it when no apps available or request for apps failed.
Therefore added onUpdateFailed callback to ApplicationHolder.
@jmattheis jmattheis self-requested a review July 27, 2021 18:06
jmattheis
jmattheis previously approved these changes Jul 27, 2021
Copy link
Member

@jmattheis jmattheis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@jmattheis jmattheis merged commit b35d5af into gotify:master Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Disable send button if the user has no apps
2 participants