🦟 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)
|
||||
prefs = getSharedPreferences("com.mylloon.MobiDL", MODE_PRIVATE)
|
||||
|
||||
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
|
||||
}
|
||||
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()
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue