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

Added dismissRateDialog() function. #92

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Zeykit
Copy link

@Zeykit Zeykit commented Aug 5, 2017

• I've added dismissRateDialog() function. I've been need to change a very little piece of code to make this works.

• I've added dismissRateDialog() function. I've been need to change a very little piece of code to make this works.
@Zeykit Zeykit changed the title Update RateThisApp.java Added dismissRateDialog() function. Aug 5, 2017
Copy link
Owner

@kobakei kobakei left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution.
I wrote some feedbacks.

*/
public static void dismissRateDialog() {
if (dialog != null)
dialog.dismiss();
Copy link
Owner

Choose a reason for hiding this comment

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

Add dialog = null;

@@ -62,6 +45,9 @@
// Weak ref to avoid leaking the context
private static WeakReference<AlertDialog> sDialogRef = null;

private static AlertDialog dialog;
Copy link
Owner

Choose a reason for hiding this comment

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

Add @Nullable to dialog and builder

@@ -1,20 +1,3 @@
/*
Copy link
Owner

Choose a reason for hiding this comment

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

Keep license comment

@@ -178,7 +164,8 @@ public static boolean shouldShowRateDialog() {
* @param context
*/
public static void showRateDialog(final Context context) {
AlertDialog.Builder builder = new AlertDialog.Builder(context);
Copy link
Owner

Choose a reason for hiding this comment

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

How about builder and dialog are not null? (= dialog is shown)
It may be better to do nothing on the situation.

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.

None yet

2 participants