diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt index d4becf2d2..12e454d3b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt @@ -18,7 +18,6 @@ import androidx.appcompat.widget.SearchView import androidx.core.view.MenuItemCompat import com.simplemobiletools.calendar.BuildConfig import com.simplemobiletools.calendar.R -import com.simplemobiletools.calendar.R.id.* import com.simplemobiletools.calendar.adapters.EventListAdapter import com.simplemobiletools.calendar.dialogs.ExportEventsDialog import com.simplemobiletools.calendar.dialogs.FilterEventTypesDialog @@ -32,6 +31,7 @@ import com.simplemobiletools.calendar.models.EventType import com.simplemobiletools.calendar.models.ListEvent import com.simplemobiletools.commons.dialogs.FilePickerDialog import com.simplemobiletools.commons.dialogs.RadioGroupDialog +import com.simplemobiletools.commons.dialogs.UpgradeToProDialog import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.* import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener @@ -103,6 +103,11 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener { } checkAppOnSDCard() + + if (!config.wasInitialUpgradeToProShown) { + UpgradeToProDialog(this) + config.wasInitialUpgradeToProShown + } } override fun onResume() { diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/SettingsActivity.kt index 33b1d8409..c01437ee7 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/SettingsActivity.kt @@ -43,7 +43,7 @@ class SettingsActivity : SimpleActivity() { override fun onResume() { super.onResume() - setupPurchaseThankYou() + setupUpgradeToPro() setupCustomizeColors() setupUseEnglish() setupManageEventTypes() @@ -110,10 +110,10 @@ class SettingsActivity : SimpleActivity() { } } - private fun setupPurchaseThankYou() { - settings_purchase_thank_you_holder.beVisibleIf(config.appRunCount > 10 && !isThankYouInstalled()) - settings_purchase_thank_you_holder.setOnClickListener { - launchPurchaseThankYouIntent() + private fun setupUpgradeToPro() { + settings_upgrade_to_pro_holder.beGoneIf(isAProApp()) + settings_upgrade_to_pro_holder.setOnClickListener { + launchUpgradeToProIntent() } } diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index a685e43ae..14a6dade8 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -12,7 +12,7 @@ android:orientation="vertical"> + android:text="@string/upgrade_to_pro"/>