|
@@ -26,10 +26,16 @@ class LoginActivity : AppCompatActivity(),
|
|
|
View.OnClickListener {
|
|
|
|
|
|
companion object {
|
|
|
+ var isStarted = false
|
|
|
+ private set
|
|
|
+
|
|
|
const val autoLogin = "autoLogin"
|
|
|
const val loginMessage = "loginMessage"
|
|
|
|
|
|
fun start(context: Context, extras: Bundle) {
|
|
|
+ if (isStarted) return
|
|
|
+
|
|
|
+ isStarted = true
|
|
|
Intent(context, LoginActivity::class.java).let {
|
|
|
it.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_CLEAR_TASK)
|
|
|
it.putExtras(extras)
|
|
@@ -74,6 +80,11 @@ class LoginActivity : AppCompatActivity(),
|
|
|
BuglyUtil.checkUpgrade()
|
|
|
}
|
|
|
|
|
|
+ override fun onDestroy() {
|
|
|
+ super.onDestroy()
|
|
|
+ isStarted = false
|
|
|
+ }
|
|
|
+
|
|
|
override fun onClick(v: View?) {
|
|
|
when (v) {
|
|
|
binding.buttonLogin -> submit()
|