From 2affda87a8f5befd7766af5be34e92bc48d38377 Mon Sep 17 00:00:00 2001 From: Phillip Thelen Date: Fri, 8 Oct 2021 10:58:04 +0200 Subject: [PATCH] finish bugfix update --- Habitica/build.gradle | 4 ++-- Habitica/res/values-en-rGB/strings.xml | 2 +- Habitica/res/values/strings.xml | 2 +- .../android/habitica/HabiticaPurchaseVerifier.kt | 2 +- .../habitica/ui/fragments/NavigationDrawerFragment.kt | 10 +++------- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/Habitica/build.gradle b/Habitica/build.gradle index c861e0679..b24331949 100644 --- a/Habitica/build.gradle +++ b/Habitica/build.gradle @@ -155,8 +155,8 @@ android { buildConfigField "String", "TESTING_LEVEL", "\"production\"" resConfigs "en", "bg", "de", "en-rGB", "es", "fr", "hr-rHR", "in", "it", "iw", "ja", "ko", "lt", "nl", "pl", "pt-rBR", "pt-rPT", "ru", "tr", "zh", "zh-rTW" - versionCode 3063 - versionName "3.4.0.1" + versionCode 3067 + versionName "3.4.0.2" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/Habitica/res/values-en-rGB/strings.xml b/Habitica/res/values-en-rGB/strings.xml index eb3fd6d5f..807f162bb 100644 --- a/Habitica/res/values-en-rGB/strings.xml +++ b/Habitica/res/values-en-rGB/strings.xml @@ -1101,5 +1101,5 @@ This promotion only applies during the limited time event. This event starts on October 29th at 8:00 AM EDT (12:00 UTC) and will end November 2nd at 8:00 PM EDT (00:00 UTC). The promo offer is only available when buying Gems for yourself. Between October 29th and November 2nd, simply purchase any Gem bundle like usual and your account will be credited with the promotional amount of Gems. More Gems to spend, share, or save for any future releases! View Gem Bundles - The Fall Gala is in full swing so we thought it was the perfect time to introduce our first ever Gem Sale! Now you will get more Gems with each purchase than ever before. + The Fall Gala is in full swing so we thought it was the perfect time for a Gem Sale! Now you will get more Gems with each purchase than ever before. diff --git a/Habitica/res/values/strings.xml b/Habitica/res/values/strings.xml index 7c6a4859d..784016d1d 100644 --- a/Habitica/res/values/strings.xml +++ b/Habitica/res/values/strings.xml @@ -1114,7 +1114,7 @@ How it works Limitations Between %s and %s, simply purchase any Gem bundle like usual and your account will be credited with the promotional amount of Gems. More Gems to spend, share, or save for any future releases! - The Fall Gala is in full swing so we thought it was the perfect time to introduce our first ever Gem Sale! Now you will get more Gems with each purchase than ever before. + The Fall Gala is in full swing so we thought it was the perfect time for a Gem Sale! Now you will get more Gems with each purchase than ever before. View Gem Bundles Between %s and %s, simply purchase any Gem bundle like usual and your account will be credited with the promotional amount of Gems. More Gems to spend, share, or save for any future releases! This promotion only applies during the limited time event. This event starts on %s (12:00 UTC) and will end %s (00:00 UTC). The promo offer is only available when buying Gems for yourself. diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/HabiticaPurchaseVerifier.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/HabiticaPurchaseVerifier.kt index a357088b1..5d062fcb8 100644 --- a/Habitica/src/main/java/com/habitrpg/android/habitica/HabiticaPurchaseVerifier.kt +++ b/Habitica/src/main/java/com/habitrpg/android/habitica/HabiticaPurchaseVerifier.kt @@ -78,7 +78,7 @@ class HabiticaPurchaseVerifier(context: Context, apiClient: ApiClient) : BasePur } } preferences?.edit { - edit?.putStringSet(PURCHASED_PRODUCTS_KEY, purchasedOrderList) + putStringSet(PURCHASED_PRODUCTS_KEY, purchasedOrderList) } } diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/fragments/NavigationDrawerFragment.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/fragments/NavigationDrawerFragment.kt index 8b9228c87..cf625dd3d 100644 --- a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/fragments/NavigationDrawerFragment.kt +++ b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/fragments/NavigationDrawerFragment.kt @@ -642,13 +642,9 @@ class NavigationDrawerFragment : DialogFragment() { activePromo = configManager.activePromo() val promoItem = getItemWithIdentifier(SIDEBAR_PROMO) ?: return activePromo?.let { activePromo -> - if (sharedPreferences.getBoolean("hide${activePromo.identifier}", false)) { - promoItem.isVisible = true - adapter.activePromo = activePromo - } else { - promoItem.isVisible = false - } - + promoItem.isVisible = + !sharedPreferences.getBoolean("hide${activePromo.identifier}", false) + adapter.activePromo = activePromo var promotedItem: HabiticaDrawerItem? = null if (activePromo.promoType == PromoType.GEMS_AMOUNT || activePromo.promoType == PromoType.GEMS_PRICE) { promotedItem = getItemWithIdentifier(SIDEBAR_GEMS)