Skip to content

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.

Zeykit added 2 commits August 5, 2017 23:46
• 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;

// 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

* @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.

2 participants