Skip to content

Commit 2412266

Browse files
authored
Merge pull request #21112 from wordpress-mobile/hotfix/25.2.1-drop-rating-dialog
Hotfix 25.2.1: Remove the app rating dialog
2 parents f1e25a8 + 9421c52 commit 2412266

File tree

4 files changed

+54
-228
lines changed

4 files changed

+54
-228
lines changed

WordPress/src/main/java/org/wordpress/android/ui/main/WPMainActivity.java

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,6 @@ public void onCreate(@Nullable Bundle savedInstanceState) {
355355
mIsMagicLinkSignup = getIntent().getBooleanExtra(ARG_IS_MAGIC_LINK_SIGNUP, false);
356356
mJetpackConnectSource = (JetpackConnectionSource) getIntent().getSerializableExtra(ARG_JETPACK_CONNECT_SOURCE);
357357
String authTokenToSet = null;
358-
boolean canShowAppRatingPrompt = savedInstanceState != null;
359358

360359
mBottomNav = findViewById(R.id.bottom_navigation);
361360
mBottomNav.init(getSupportFragmentManager(), this, mJetpackFeatureRemovalPhaseHelper);
@@ -419,8 +418,6 @@ public void onCreate(@Nullable Bundle savedInstanceState) {
419418
&& getIntent().getExtras().getBoolean(ARG_CONTINUE_JETPACK_CONNECT, false)) {
420419
JetpackConnectionWebViewActivity.startJetpackConnectionFlow(this, NOTIFICATIONS,
421420
(SiteModel) getIntent().getSerializableExtra(SITE), mAccountStore.hasAccessToken());
422-
} else {
423-
canShowAppRatingPrompt = true;
424421
}
425422
}
426423
} else {
@@ -469,30 +466,25 @@ && getIntent().getExtras().getBoolean(ARG_CONTINUE_JETPACK_CONNECT, false)) {
469466
UpdateTokenPayload payload = new UpdateTokenPayload(authTokenToSet);
470467
mDispatcher.dispatch(AccountActionBuilder.newUpdateAccessTokenAction(payload));
471468
} else if (getIntent().getBooleanExtra(ARG_SHOW_LOGIN_EPILOGUE, false) && savedInstanceState == null) {
472-
canShowAppRatingPrompt = false;
473469
ActivityLauncher.showLoginEpilogue(
474470
this,
475471
getIntent().getBooleanExtra(ARG_DO_LOGIN_UPDATE, false),
476472
getIntent().getIntegerArrayListExtra(ARG_OLD_SITES_IDS),
477473
mBuildConfigWrapper.isSiteCreationEnabled()
478474
);
479475
} else if (getIntent().getBooleanExtra(ARG_SHOW_SIGNUP_EPILOGUE, false) && savedInstanceState == null) {
480-
canShowAppRatingPrompt = false;
481476
ActivityLauncher.showSignupEpilogue(this,
482477
getIntent().getStringExtra(SignupEpilogueActivity.EXTRA_SIGNUP_DISPLAY_NAME),
483478
getIntent().getStringExtra(SignupEpilogueActivity.EXTRA_SIGNUP_EMAIL_ADDRESS),
484479
getIntent().getStringExtra(SignupEpilogueActivity.EXTRA_SIGNUP_PHOTO_URL),
485480
getIntent().getStringExtra(SignupEpilogueActivity.EXTRA_SIGNUP_USERNAME), false);
486481
} else if (getIntent().getBooleanExtra(ARG_SHOW_SITE_CREATION, false) && savedInstanceState == null) {
487-
canShowAppRatingPrompt = false;
488482
ActivityLauncher.newBlogForResult(this,
489483
SiteCreationSource.fromString(getIntent().getStringExtra(ARG_SITE_CREATION_SOURCE)));
490484
} else if (getIntent().getBooleanExtra(ARG_WP_COM_SIGN_UP, false) && savedInstanceState == null) {
491-
canShowAppRatingPrompt = false;
492485
ActivityLauncher.showSignInForResultWpComOnly(this);
493486
} else if (getIntent().getBooleanExtra(ARG_BLOGGING_PROMPTS_ONBOARDING, false)
494487
&& savedInstanceState == null) {
495-
canShowAppRatingPrompt = false;
496488
showBloggingPromptsOnboarding();
497489
}
498490

@@ -501,10 +493,6 @@ && getIntent().getExtras().getBoolean(ARG_CONTINUE_JETPACK_CONNECT, false)) {
501493
mGCMRegistrationScheduler.scheduleRegistration();
502494
}
503495

504-
if (canShowAppRatingPrompt) {
505-
AppReviewManager.INSTANCE.showRateDialogIfNeeded(getSupportFragmentManager());
506-
}
507-
508496
scheduleLocalNotifications();
509497
initViewModel();
510498

@@ -1184,9 +1172,7 @@ protected void onResume() {
11841172
getSelectedPage()
11851173
);
11861174

1187-
if (AppReviewManager.INSTANCE.shouldShowInAppReviewsPrompt()) {
1188-
AppReviewManager.INSTANCE.launchInAppReviews(this);
1189-
}
1175+
AppReviewManager.INSTANCE.showInAppReviewsPromptIfNecessary(this);
11901176
checkForInAppUpdate();
11911177

11921178
mIsChangingConfiguration = false;

WordPress/src/main/java/org/wordpress/android/ui/posts/PostsListActivity.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,10 +427,9 @@ class PostsListActivity : LocaleAwareActivity(),
427427
override fun onResume() {
428428
super.onResume()
429429
ActivityId.trackLastActivity(ActivityId.POSTS)
430-
if (AppReviewManager.shouldShowInAppReviewsPrompt()) {
431-
AppReviewManager.launchInAppReviews(this)
432-
}
430+
AppReviewManager.showInAppReviewsPromptIfNecessary(this)
433431
}
432+
434433
@Suppress("DEPRECATION", "OVERRIDE_DEPRECATION")
435434
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
436435
super.onActivityResult(requestCode, resultCode, data)

WordPress/src/main/java/org/wordpress/android/ui/prefs/AppPrefs.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ public enum DeletablePrefKey implements PrefKey {
164164
PINNED_DYNAMIC_CARD,
165165
// PUBLISHED_POST_COUNT will increase until it reaches AppReviewManager.TARGET_COUNT_POST_PUBLISHED
166166
PUBLISHED_POST_COUNT,
167-
// PUBLISHED_POST_COUNT will increase until it reaches AppReviewManager.TARGET_COUNT_NOTIFICATIONS
168167
IN_APP_REVIEWS_NOTIFICATION_COUNT,
169168
BLOGGING_REMINDERS_SHOWN,
170169
SHOULD_SCHEDULE_CREATE_SITE_NOTIFICATION,

0 commit comments

Comments
 (0)