Skip to content

Commit

Permalink
Merge pull request #553 from jorgeblacio/rate_fix
Browse files Browse the repository at this point in the history
Fix rate me dialog that was appearing all the time.
  • Loading branch information
danieltigse authored Oct 13, 2019
2 parents c94d659 + b94b449 commit a076e45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ android {
defaultConfig {
minSdkVersion 21
targetSdkVersion 28
versionCode 90
versionName "0.21.13"
versionCode 92
versionName "0.21.15"
applicationId "com.criptext.mail"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ object AppRater {

// Wait at least n days before opening
if (launchCount >= LAUNCHES_UNTIL_PROMPT) {
showRateDialog(ctx, storage)
if (System.currentTimeMillis() >= dateFirstLaunch + DAYS_UNTIL_PROMPT * 24 * 60 * 60 * 1000) {
showRateDialog(ctx, storage)
}
Expand All @@ -55,6 +54,7 @@ object AppRater {
generalDialogConfirmation.btnCancel.text = mContext.getLocalizedUIMessage(UIMessage(R.string.rate_remind_later))
generalDialogConfirmation.btnOk.setOnClickListener {
mContext.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=$APP_NAME")))
storage.putBool(KeyValueStorage.StringKey.RateDontShowAgain, true)
generalDialogConfirmation.dismissDialog()
}

Expand Down

0 comments on commit a076e45

Please sign in to comment.