aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IABDialogs.kt
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IABDialogs.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IABDialogs.kt6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IABDialogs.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IABDialogs.kt
index d2f22829..df0f04fd 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IABDialogs.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/iab/IABDialogs.kt
@@ -31,7 +31,7 @@ private fun Activity.playRestart() {
} else restart()
}
-fun Activity.playStoreNoLongerPro() {
+fun Activity?.playStoreNoLongerPro() {
Prefs.pro = false
L.d("IAB No longer pro")
frostAnswers {
@@ -39,6 +39,7 @@ fun Activity.playStoreNoLongerPro() {
.putCustomAttribute("result", "no longer pro")
.putSuccess(false))
}
+ if (this == null) return
materialDialogThemed {
title(R.string.uh_oh)
content(R.string.play_store_not_pro)
@@ -49,9 +50,10 @@ fun Activity.playStoreNoLongerPro() {
}
}
-fun Activity.playStoreFoundPro() {
+fun Activity?.playStoreFoundPro() {
Prefs.pro = true
L.d("Found pro")
+ if (this == null) return
materialDialogThemed {
title(R.string.found_pro)
content(R.string.found_pro_desc)