move show_donate_in_about to buildconfig

This commit is contained in:
tibbi 2022-01-14 13:33:04 +01:00 committed by Hosted Weblate
parent 70aeeffdfb
commit 582a8b0f60
No known key found for this signature in database
GPG key ID: A3FAAA06E6569B4C
3 changed files with 3 additions and 2 deletions

View file

@ -10,6 +10,7 @@ android {
defaultConfig {
minSdkVersion propMinSdkVersion
targetSdkVersion propTargetSdkVersion
buildConfigField "boolean", "show_donate_in_about", "false"
}
buildTypes {

View file

@ -8,6 +8,7 @@ import android.os.Bundle
import android.os.Handler
import android.view.Menu
import androidx.core.net.toUri
import com.simplemobiletools.commons.BuildConfig
import com.simplemobiletools.commons.R
import com.simplemobiletools.commons.dialogs.ConfirmationAdvancedDialog
import com.simplemobiletools.commons.dialogs.RateStarsDialog
@ -134,7 +135,7 @@ class AboutActivity : BaseSimpleActivity() {
}
private fun setupDonate() {
if (resources.getBoolean(R.bool.show_donate_in_about)) {
if (BuildConfig.show_donate_in_about) {
about_donate_holder.beVisible()
about_contributors_holder.background = resources.getDrawable(R.drawable.ripple_background, theme)
about_donate_holder.setOnClickListener {

View file

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="default_vibrate_on_press">false</bool>
<bool name="show_donate_in_about">false</bool>
</resources>