20% Chance of getting Update extension
This commit is contained in:
parent
78b7d07500
commit
3ec488675f
1 changed files with 8 additions and 5 deletions
|
@ -65,6 +65,7 @@ import nl.joery.animatedbottombar.AnimatedBottomBar
|
||||||
import uy.kohesive.injekt.Injekt
|
import uy.kohesive.injekt.Injekt
|
||||||
import uy.kohesive.injekt.api.get
|
import uy.kohesive.injekt.api.get
|
||||||
import java.io.Serializable
|
import java.io.Serializable
|
||||||
|
import kotlin.random.Random
|
||||||
|
|
||||||
|
|
||||||
class MainActivity : AppCompatActivity() {
|
class MainActivity : AppCompatActivity() {
|
||||||
|
@ -163,12 +164,14 @@ class MainActivity : AppCompatActivity() {
|
||||||
|
|
||||||
val preferences: SourcePreferences = Injekt.get()
|
val preferences: SourcePreferences = Injekt.get()
|
||||||
if (preferences.animeExtensionUpdatesCount().get() > 0 || preferences.mangaExtensionUpdatesCount().get() > 0) {
|
if (preferences.animeExtensionUpdatesCount().get() > 0 || preferences.mangaExtensionUpdatesCount().get() > 0) {
|
||||||
|
if (Random.nextInt(0, 4) == 1){
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
this,
|
this,
|
||||||
"You have extension updates available!",
|
"You have extension updates available!",
|
||||||
Toast.LENGTH_LONG
|
Toast.LENGTH_LONG
|
||||||
).show()
|
).show()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
binding.root.isMotionEventSplittingEnabled = false
|
binding.root.isMotionEventSplittingEnabled = false
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue