Fix bugs
This commit is contained in:
parent
0bedf5e6de
commit
83b9cd45d5
8 changed files with 20 additions and 44 deletions
|
@ -15,8 +15,8 @@ android {
|
|||
|
||||
defaultConfig {
|
||||
// versionCode and versionName must be hardcoded to support F-droid
|
||||
versionCode 805021
|
||||
versionName '8.5.2'
|
||||
versionCode 805041
|
||||
versionName '8.5.4'
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
multiDexEnabled true
|
||||
|
|
|
@ -47,41 +47,11 @@
|
|||
<tools:validation testUrl="https://www.lucasnlm.dev/" />
|
||||
<tools:validation testUrl="http://www.lucasnlm.dev/" />
|
||||
|
||||
<meta-data
|
||||
android:name="default-url"
|
||||
android:value="https://www.lucasnlm.dev/antimine" />
|
||||
|
||||
<intent-filter
|
||||
android:order="0">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter
|
||||
android:order="1"
|
||||
android:autoVerify="true"
|
||||
tools:targetApi="m">
|
||||
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data android:scheme="http" />
|
||||
<data android:scheme="https" />
|
||||
|
||||
<data
|
||||
android:host="www.lucasnlm.dev" />
|
||||
|
||||
<data
|
||||
android:host="www.lucasnlm.dev"
|
||||
android:path="/" />
|
||||
|
||||
<data
|
||||
android:host="www.lucasnlm.dev"
|
||||
android:path="/antimine" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.app.shortcuts"
|
||||
android:resource="@xml/shortcuts" />
|
||||
|
|
|
@ -27,6 +27,7 @@ import dev.lucasnlm.external.Ads
|
|||
import dev.lucasnlm.external.IAdsManager
|
||||
import dev.lucasnlm.external.IBillingManager
|
||||
import dev.lucasnlm.external.IInstantAppManager
|
||||
import dev.lucasnlm.external.view.AdPlaceHolderView
|
||||
import kotlinx.android.synthetic.main.view_play_games_button.view.*
|
||||
import kotlinx.android.synthetic.main.view_stats.*
|
||||
import kotlinx.coroutines.flow.collect
|
||||
|
@ -107,6 +108,7 @@ class EndGameDialogFragment : AppCompatDialogFragment() {
|
|||
}
|
||||
}
|
||||
|
||||
val adsView: AdPlaceHolderView = findViewById(R.id.ads)
|
||||
val shareButton: AppCompatButton = findViewById(R.id.share)
|
||||
val newGameButton: AppCompatButton = findViewById(R.id.new_game)
|
||||
val continueButton: AppCompatButton = findViewById(R.id.continue_game)
|
||||
|
@ -118,7 +120,6 @@ class EndGameDialogFragment : AppCompatDialogFragment() {
|
|||
shareButton.setOnClickListener {
|
||||
revealMinesOnDismiss = false
|
||||
gameViewModel.shareObserver.postValue(Unit)
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
|
||||
newGameButton.setOnClickListener {
|
||||
|
@ -132,6 +133,7 @@ class EndGameDialogFragment : AppCompatDialogFragment() {
|
|||
|
||||
if (preferencesRepository.isPremiumEnabled()) {
|
||||
gameViewModel.continueObserver.postValue(Unit)
|
||||
dismissAllowingStateLoss()
|
||||
} else {
|
||||
showAdsAndContinue()
|
||||
}
|
||||
|
@ -167,8 +169,9 @@ class EndGameDialogFragment : AppCompatDialogFragment() {
|
|||
}
|
||||
}
|
||||
|
||||
if (!preferencesRepository.isPremiumEnabled()) {
|
||||
if (!preferencesRepository.isPremiumEnabled() && !instantAppManager.isEnabled(context)) {
|
||||
activity?.let { activity ->
|
||||
adsView.visibility = View.VISIBLE
|
||||
removeAdsButton.visibility = View.VISIBLE
|
||||
val label = context.getString(R.string.remove_ad)
|
||||
val price = billingManager.getPrice().singleOrNull()
|
||||
|
@ -177,8 +180,8 @@ class EndGameDialogFragment : AppCompatDialogFragment() {
|
|||
removeAdsButton.setOnClickListener {
|
||||
lifecycleScope.launch {
|
||||
billingManager.charge(activity)
|
||||
adsView.visibility = View.GONE
|
||||
}
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,6 +96,9 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="8dp"
|
||||
android:minHeight="66dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
tools:background="@color/accent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/received_message"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
|
@ -10,8 +10,8 @@ android {
|
|||
|
||||
defaultConfig {
|
||||
// versionCode and versionName must be hardcoded to support F-droid
|
||||
versionCode 805021
|
||||
versionName '8.5.2'
|
||||
versionCode 805041
|
||||
versionName '8.5.4'
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||
|
|
|
@ -8,8 +8,8 @@ android {
|
|||
compileSdkVersion 30
|
||||
|
||||
defaultConfig {
|
||||
versionCode 805021
|
||||
versionName '8.5.2'
|
||||
versionCode 805041
|
||||
versionName '8.5.4'
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
}
|
||||
|
|
|
@ -12,8 +12,8 @@ android {
|
|||
compileSdkVersion 30
|
||||
|
||||
defaultConfig {
|
||||
versionCode 805021
|
||||
versionName '8.5.2'
|
||||
versionCode 805041
|
||||
versionName '8.5.4'
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
}
|
||||
|
|
|
@ -10,8 +10,8 @@ android {
|
|||
|
||||
defaultConfig {
|
||||
// versionCode and versionName must be hardcoded to support F-droid
|
||||
versionCode 805021
|
||||
versionName '8.5.2'
|
||||
versionCode 805041
|
||||
versionName '8.5.4'
|
||||
applicationId 'dev.lucasnlm.antimine'
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 30
|
||||
|
|
Loading…
Reference in a new issue