Disable in-app ads
This commit is contained in:
parent
2e43f957cd
commit
0bedf5e6de
4 changed files with 14 additions and 7 deletions
|
@ -930,15 +930,19 @@ class GameActivity : ThematicActivity(R.layout.activity_game), DialogInterface.O
|
|||
}
|
||||
|
||||
private fun refreshAds() {
|
||||
val isTutorialComplete = preferencesRepository.isTutorialCompleted()
|
||||
if (isTutorialComplete && !preferencesRepository.isPremiumEnabled() && billingManager.isEnabled()) {
|
||||
if (!instantAppManager.isEnabled(this)) {
|
||||
navigationView.menu.setGroupVisible(R.id.remove_ads_group, true)
|
||||
ad_placeholder.visibility = View.VISIBLE
|
||||
ad_placeholder.loadAd()
|
||||
if (featureFlagManager.isInAppAdsEnabled()) {
|
||||
val isTutorialComplete = preferencesRepository.isTutorialCompleted()
|
||||
if (isTutorialComplete && !preferencesRepository.isPremiumEnabled() && billingManager.isEnabled()) {
|
||||
if (!instantAppManager.isEnabled(this)) {
|
||||
navigationView.menu.setGroupVisible(R.id.remove_ads_group, true)
|
||||
ad_placeholder.visibility = View.VISIBLE
|
||||
ad_placeholder.loadAd()
|
||||
}
|
||||
} else {
|
||||
navigationView.menu.setGroupVisible(R.id.remove_ads_group, false)
|
||||
ad_placeholder.visibility = View.GONE
|
||||
}
|
||||
} else {
|
||||
navigationView.menu.setGroupVisible(R.id.remove_ads_group, false)
|
||||
ad_placeholder.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,4 +3,5 @@ package dev.lucasnlm.external
|
|||
interface IFeatureFlagManager {
|
||||
fun isGameHistoryEnabled(): Boolean
|
||||
fun isRateUsEnabled(): Boolean
|
||||
fun isInAppAdsEnabled(): Boolean
|
||||
}
|
||||
|
|
|
@ -3,4 +3,5 @@ package dev.lucasnlm.external
|
|||
class FeatureFlagManager : IFeatureFlagManager {
|
||||
override fun isGameHistoryEnabled(): Boolean = true
|
||||
override fun isRateUsEnabled(): Boolean = false
|
||||
override fun isInAppAdsEnabled(): Boolean = false
|
||||
}
|
||||
|
|
|
@ -3,4 +3,5 @@ package dev.lucasnlm.external
|
|||
class FeatureFlagManager : IFeatureFlagManager {
|
||||
override fun isGameHistoryEnabled(): Boolean = false
|
||||
override fun isRateUsEnabled(): Boolean = true
|
||||
override fun isInAppAdsEnabled(): Boolean = false
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue