From e2cbb287cc339cea02d3935e6ea83496e67dc927 Mon Sep 17 00:00:00 2001 From: Lucas Lima Date: Mon, 12 Oct 2020 08:14:43 -0300 Subject: [PATCH] Fix bugs --- .../main/java/dev/lucasnlm/antimine/cloud/CloudSaveManager.kt | 4 +++- .../dev/lucasnlm/antimine/support/SupportAppDialogFragment.kt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/dev/lucasnlm/antimine/cloud/CloudSaveManager.kt b/app/src/main/java/dev/lucasnlm/antimine/cloud/CloudSaveManager.kt index 802fed1d..926b8417 100644 --- a/app/src/main/java/dev/lucasnlm/antimine/cloud/CloudSaveManager.kt +++ b/app/src/main/java/dev/lucasnlm/antimine/cloud/CloudSaveManager.kt @@ -34,7 +34,9 @@ class CloudSaveManager( CloudSave( playId = playerId, completeTutorial = if (preferencesRepository.isTutorialCompleted()) 1 else 0, - selectedTheme = preferencesRepository.themeId().toInt(), + selectedTheme = if (preferencesRepository.isPremiumEnabled()) 3.coerceAtLeast( + preferencesRepository.themeId().toInt() + ) else 0, squareRadius = preferencesRepository.squareRadius(), squareSize = preferencesRepository.squareSizeMultiplier(), touchTiming = preferencesRepository.customLongPressTimeout().toInt(), diff --git a/app/src/main/java/dev/lucasnlm/antimine/support/SupportAppDialogFragment.kt b/app/src/main/java/dev/lucasnlm/antimine/support/SupportAppDialogFragment.kt index db6ac268..36ac73f3 100644 --- a/app/src/main/java/dev/lucasnlm/antimine/support/SupportAppDialogFragment.kt +++ b/app/src/main/java/dev/lucasnlm/antimine/support/SupportAppDialogFragment.kt @@ -64,7 +64,7 @@ class SupportAppDialogFragment : AppCompatDialogFragment() { } val unlockMessage = context.getString(R.string.try_it) - setNeutralButton("$unlockMessage \uD83C\uDF9E️") { _, _ -> + setPositiveButton("$unlockMessage \uD83C\uDF9E️") { _, _ -> activity?.let { if (!it.isFinishing) { adsManager.requestRewarded(