Skip to content

Commit

Permalink
Merge pull request #21112 from wordpress-mobile/hotfix/25.2.1-drop-ra…
Browse files Browse the repository at this point in the history
…ting-dialog

Hotfix 25.2.1: Remove the app rating dialog
  • Loading branch information
oguzkocer authored Aug 2, 2024
2 parents f1e25a8 + 9421c52 commit 2412266
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 228 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@ public void onCreate(@Nullable Bundle savedInstanceState) {
mIsMagicLinkSignup = getIntent().getBooleanExtra(ARG_IS_MAGIC_LINK_SIGNUP, false);
mJetpackConnectSource = (JetpackConnectionSource) getIntent().getSerializableExtra(ARG_JETPACK_CONNECT_SOURCE);
String authTokenToSet = null;
boolean canShowAppRatingPrompt = savedInstanceState != null;

mBottomNav = findViewById(R.id.bottom_navigation);
mBottomNav.init(getSupportFragmentManager(), this, mJetpackFeatureRemovalPhaseHelper);
Expand Down Expand Up @@ -419,8 +418,6 @@ public void onCreate(@Nullable Bundle savedInstanceState) {
&& getIntent().getExtras().getBoolean(ARG_CONTINUE_JETPACK_CONNECT, false)) {
JetpackConnectionWebViewActivity.startJetpackConnectionFlow(this, NOTIFICATIONS,
(SiteModel) getIntent().getSerializableExtra(SITE), mAccountStore.hasAccessToken());
} else {
canShowAppRatingPrompt = true;
}
}
} else {
Expand Down Expand Up @@ -469,30 +466,25 @@ && getIntent().getExtras().getBoolean(ARG_CONTINUE_JETPACK_CONNECT, false)) {
UpdateTokenPayload payload = new UpdateTokenPayload(authTokenToSet);
mDispatcher.dispatch(AccountActionBuilder.newUpdateAccessTokenAction(payload));
} else if (getIntent().getBooleanExtra(ARG_SHOW_LOGIN_EPILOGUE, false) && savedInstanceState == null) {
canShowAppRatingPrompt = false;
ActivityLauncher.showLoginEpilogue(
this,
getIntent().getBooleanExtra(ARG_DO_LOGIN_UPDATE, false),
getIntent().getIntegerArrayListExtra(ARG_OLD_SITES_IDS),
mBuildConfigWrapper.isSiteCreationEnabled()
);
} else if (getIntent().getBooleanExtra(ARG_SHOW_SIGNUP_EPILOGUE, false) && savedInstanceState == null) {
canShowAppRatingPrompt = false;
ActivityLauncher.showSignupEpilogue(this,
getIntent().getStringExtra(SignupEpilogueActivity.EXTRA_SIGNUP_DISPLAY_NAME),
getIntent().getStringExtra(SignupEpilogueActivity.EXTRA_SIGNUP_EMAIL_ADDRESS),
getIntent().getStringExtra(SignupEpilogueActivity.EXTRA_SIGNUP_PHOTO_URL),
getIntent().getStringExtra(SignupEpilogueActivity.EXTRA_SIGNUP_USERNAME), false);
} else if (getIntent().getBooleanExtra(ARG_SHOW_SITE_CREATION, false) && savedInstanceState == null) {
canShowAppRatingPrompt = false;
ActivityLauncher.newBlogForResult(this,
SiteCreationSource.fromString(getIntent().getStringExtra(ARG_SITE_CREATION_SOURCE)));
} else if (getIntent().getBooleanExtra(ARG_WP_COM_SIGN_UP, false) && savedInstanceState == null) {
canShowAppRatingPrompt = false;
ActivityLauncher.showSignInForResultWpComOnly(this);
} else if (getIntent().getBooleanExtra(ARG_BLOGGING_PROMPTS_ONBOARDING, false)
&& savedInstanceState == null) {
canShowAppRatingPrompt = false;
showBloggingPromptsOnboarding();
}

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

if (canShowAppRatingPrompt) {
AppReviewManager.INSTANCE.showRateDialogIfNeeded(getSupportFragmentManager());
}

scheduleLocalNotifications();
initViewModel();

Expand Down Expand Up @@ -1184,9 +1172,7 @@ protected void onResume() {
getSelectedPage()
);

if (AppReviewManager.INSTANCE.shouldShowInAppReviewsPrompt()) {
AppReviewManager.INSTANCE.launchInAppReviews(this);
}
AppReviewManager.INSTANCE.showInAppReviewsPromptIfNecessary(this);
checkForInAppUpdate();

mIsChangingConfiguration = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,10 +427,9 @@ class PostsListActivity : LocaleAwareActivity(),
override fun onResume() {
super.onResume()
ActivityId.trackLastActivity(ActivityId.POSTS)
if (AppReviewManager.shouldShowInAppReviewsPrompt()) {
AppReviewManager.launchInAppReviews(this)
}
AppReviewManager.showInAppReviewsPromptIfNecessary(this)
}

@Suppress("DEPRECATION", "OVERRIDE_DEPRECATION")
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ public enum DeletablePrefKey implements PrefKey {
PINNED_DYNAMIC_CARD,
// PUBLISHED_POST_COUNT will increase until it reaches AppReviewManager.TARGET_COUNT_POST_PUBLISHED
PUBLISHED_POST_COUNT,
// PUBLISHED_POST_COUNT will increase until it reaches AppReviewManager.TARGET_COUNT_NOTIFICATIONS
IN_APP_REVIEWS_NOTIFICATION_COUNT,
BLOGGING_REMINDERS_SHOWN,
SHOULD_SCHEDULE_CREATE_SITE_NOTIFICATION,
Expand Down
Loading

0 comments on commit 2412266

Please sign in to comment.