🦟 Fix Settings icon bug + Spam Login/Reset Credentials

This commit is contained in:
Mylloon 2021-08-29 03:50:08 +02:00
parent 9e0a908e7a
commit fd1458970b

View file

@ -50,11 +50,13 @@ class MainActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
prefs = getSharedPreferences("com.mylloon.MobiDL", MODE_PRIVATE)
try {
if (Credentials().get(0) == null) { // test if credentials have already been registered
loginPage() // if no ask for
} else {
mainPage() // if yes go to main page
}
} catch (_: Throwable) { loginPage() }
}
private fun loginPage() {
@ -121,7 +123,6 @@ class MainActivity : AppCompatActivity() {
Credentials().delete()
Toast.makeText(this@MainActivity, "Deleted credentials", Toast.LENGTH_LONG)
.show()
toggleSettingsButtonVisibility()
loginPage()
}