Disable in-app ads
This commit is contained in:
parent
2e43f957cd
commit
0bedf5e6de
4 changed files with 14 additions and 7 deletions
|
@ -930,6 +930,7 @@ class GameActivity : ThematicActivity(R.layout.activity_game), DialogInterface.O
|
|||
}
|
||||
|
||||
private fun refreshAds() {
|
||||
if (featureFlagManager.isInAppAdsEnabled()) {
|
||||
val isTutorialComplete = preferencesRepository.isTutorialCompleted()
|
||||
if (isTutorialComplete && !preferencesRepository.isPremiumEnabled() && billingManager.isEnabled()) {
|
||||
if (!instantAppManager.isEnabled(this)) {
|
||||
|
@ -941,6 +942,9 @@ class GameActivity : ThematicActivity(R.layout.activity_game), DialogInterface.O
|
|||
navigationView.menu.setGroupVisible(R.id.remove_ads_group, false)
|
||||
ad_placeholder.visibility = View.GONE
|
||||
}
|
||||
} else {
|
||||
ad_placeholder.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
private fun silentGooglePlayLogin(): Boolean {
|
||||
|
|
|
@ -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