Skip to content

Add two optional options that are used to skip dialogs #96

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

Merged
merged 1 commit into from
Apr 10, 2018

Conversation

loban
Copy link
Contributor

@loban loban commented Apr 5, 2018

Users of the plugin (including me) may want to create a seamless experience for their users and not show any dialog prompts. This patch allows two additional options when calling the checkAppUpdate() function.

  • skipPromptDialog (when true, then the plugin immediately and silently starts downloading an update when found)
  • skipProgressDialog (when true, then the plugin does not show the progress bar dialog, and instead does it in the background)

This was inspired by pull request #78, and incorporates the request to make it an optional feature.

dialog boxes. Skipping both will result in a fully transparent
experience for the user.
@@ -140,17 +140,31 @@ private void compareVersions() {
int versionCodeLocal = version.getLocal();
int versionCodeRemote = version.getRemote();

boolean skipPromptDialog = false;
try {
skipPromptDialog = options.getBoolean("skipPromptDialog");
Copy link
Owner

Choose a reason for hiding this comment

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

Suggest you move skipPromptDialog / skipProgressDialog into Constants

@vaenow
Copy link
Owner

vaenow commented Apr 9, 2018

I have reviewed your code, it looks good. Thank you @loban for your a lot of contributions 🍻

@vaenow vaenow merged commit 9512018 into vaenow:master Apr 10, 2018
vaenow added a commit that referenced this pull request Apr 10, 2018
@loban
Copy link
Contributor Author

loban commented Apr 16, 2018

You're welcome! Glad to help. This plugin has been very useful in our current project.

@loban loban deleted the optionally-skip-dialogs branch April 22, 2018 17:18
@vaenow vaenow mentioned this pull request Dec 11, 2018
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.

2 participants