🦟 Fix Settings icon bug + Spam Login/Reset Credentials
This commit is contained in:
parent
9e0a908e7a
commit
fd1458970b
1 changed files with 7 additions and 6 deletions
|
@ -50,11 +50,13 @@ class MainActivity : AppCompatActivity() {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
prefs = getSharedPreferences("com.mylloon.MobiDL", MODE_PRIVATE)
|
prefs = getSharedPreferences("com.mylloon.MobiDL", MODE_PRIVATE)
|
||||||
|
|
||||||
if (Credentials().get(0) == null) { // test if credentials have already been registered
|
try {
|
||||||
loginPage() // if no ask for
|
if (Credentials().get(0) == null) { // test if credentials have already been registered
|
||||||
} else {
|
loginPage() // if no ask for
|
||||||
mainPage() // if yes go to main page
|
} else {
|
||||||
}
|
mainPage() // if yes go to main page
|
||||||
|
}
|
||||||
|
} catch (_: Throwable) { loginPage() }
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun loginPage() {
|
private fun loginPage() {
|
||||||
|
@ -121,7 +123,6 @@ class MainActivity : AppCompatActivity() {
|
||||||
Credentials().delete()
|
Credentials().delete()
|
||||||
Toast.makeText(this@MainActivity, "Deleted credentials", Toast.LENGTH_LONG)
|
Toast.makeText(this@MainActivity, "Deleted credentials", Toast.LENGTH_LONG)
|
||||||
.show()
|
.show()
|
||||||
toggleSettingsButtonVisibility()
|
|
||||||
loginPage()
|
loginPage()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue